diff --git a/build.gradle b/build.gradle index 22165f8f..e5980e97 100644 --- a/build.gradle +++ b/build.gradle @@ -22,10 +22,6 @@ dependencies { //compile "com.enonic.xp:core-api:${xpVersion}" // Just for apps? //compile "com.enonic.xp:portal-api:${xpVersion}" // Just for apps? - //────────────────────────────────────────────────────────────────────────── - // Core libs (com.enonic.xp) - //────────────────────────────────────────────────────────────────────────── - //────────────────────────────────────────────────────────────────────────── // New lib-explorer-4.0.0 //────────────────────────────────────────────────────────────────────────── @@ -34,6 +30,8 @@ dependencies { compile "com.enonic.xp:lib-io:${xpVersion}" compile "com.enonic.xp:lib-scheduler:${xpVersion}" compile "com.enonic.xp:lib-value:${xpVersion}" + compile 'com.enonic.lib:lib-graphql:2.0.1' + compile 'com.enonic.lib:lib-guillotine:5.5.0' //────────────────────────────────────────────────────────────────────────── // Same as lib-explorer-3.x.x @@ -45,6 +43,9 @@ dependencies { compile "com.enonic.xp:lib-portal:${xpVersion}" compile "com.enonic.xp:lib-repo:${xpVersion}" compile "com.enonic.xp:lib-task:${xpVersion}" + compile 'com.enonic.lib:lib-cache:2.1.1' + compile 'com.enonic.lib:lib-http-client:3.1.0' + compile 'com.enonic.lib:lib-license:3.0.0' //────────────────────────────────────────────────────────────────────────── // No longer needed in lib-explorer-4.0.0 @@ -55,13 +56,7 @@ dependencies { //────────────────────────────────────────────────────────────────────────── // Other enonic libs (com.enonic.lib) //────────────────────────────────────────────────────────────────────────── - compile 'com.enonic.lib:lib-cache:2.1.1' - - compile 'com.enonic.lib:lib-http-client:3.1.0' - - compile 'com.enonic.lib:lib-license:3.0.0' compile 'com.enonic.lib:lib-router:2.1.0' - //compile 'com.enonic.lib:menu:1.3.3' //compile 'com.enonic.lib:text-encoding:1.2.0' compile 'com.enonic.lib:lib-util:3.0.0' diff --git a/package.json b/package.json index 81fa53c6..106757f8 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "@types/mocha": "^9", "@types/node": "^18", "@types/react": "^18.0.10", + "@types/set-value": "^4.0.1", "@types/traverse": "^0.6.32", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/constants.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/constants.ts new file mode 100644 index 00000000..53cfae49 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/constants.ts @@ -0,0 +1,14 @@ +export const GQL_INPUT_TYPE_AGGREGATION = 'AggregationInput'; +export const GQL_INPUT_TYPE_AGGREGATION_RANGE = 'RangeAggregationInput'; +export const GQL_INPUT_TYPE_AGGREGATION_DATE_HISTOGRAM = 'DateHistogramAggregationInput'; +export const GQL_INPUT_TYPE_AGGREGATION_DATE_RANGE = 'DateRangeAggregationInput'; +export const GQL_INPUT_TYPE_AGGREGATION_GEO_DISTANCE = 'GeoDistanceAggregationInput'; +export const GQL_INPUT_TYPE_AGGREGATION_MAX = 'MaxAggregationInput'; +export const GQL_INPUT_TYPE_AGGREGATION_MIN = 'MinAggregationInput'; +export const GQL_INPUT_TYPE_AGGREGATION_STATS = 'StatsAggregationInput'; +export const GQL_INPUT_TYPE_AGGREGATION_TERMS = 'TermsAggregationInput'; +export const GQL_INPUT_TYPE_AGGREGATION_VALUE_COUNT = 'ValueCountAggregationInput'; + +export const GQL_INPUT_TYPE_DATE_RANGE = 'DateRangeInput'; +export const GQL_INPUT_TYPE_GEO_POINT = 'GeoPointInput'; +export const GQL_INPUT_TYPE_NUMBER_RANGE = 'NumberRangeInput'; diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addAggregationInput.ts new file mode 100644 index 00000000..19611a1e --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addAggregationInput.ts @@ -0,0 +1,95 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + list, + reference + //@ts-ignore +} from '/lib/graphql'; +import { + GQL_INPUT_TYPE_AGGREGATION//, + //GQL_INPUT_TYPE_AGGREGATION_RANGE, + //GQL_INPUT_TYPE_AGGREGATION_DATE_HISTOGRAM, + //GQL_INPUT_TYPE_AGGREGATION_DATE_RANGE, + //GQL_INPUT_TYPE_AGGREGATION_GEO_DISTANCE, + //GQL_INPUT_TYPE_AGGREGATION_MAX, + //GQL_INPUT_TYPE_AGGREGATION_MIN, + //GQL_INPUT_TYPE_AGGREGATION_STATS, + //GQL_INPUT_TYPE_AGGREGATION_TERMS, + //GQL_INPUT_TYPE_AGGREGATION_VALUE_COUNT +} from '../constants'; +import {addDateHistogramAggregationInput} from './addDateHistogramAggregationInput'; +import {addDateRangeAggregationInput} from './addDateRangeAggregationInput'; +import {addDateRangeInput} from './addDateRangeInput'; +import {addGeoDistanceAggregationInput} from './addGeoDistanceAggregationInput'; +import {addGeoPointInput} from './addGeoPointInput'; +import {addMaxAggregationInput} from './addMaxAggregationInput'; +import {addMinAggregationInput} from './addMinAggregationInput'; +import {addNumberRangeInput} from './addNumberRangeInput'; +import {addRangeAggregationInput} from './addRangeAggregationInput'; +import {addStatsAggregationInput} from './addStatsAggregationInput'; +import {addTermsAggregationInput} from './addTermsAggregationInput'; +import {addValueCountAggregationInput} from './addValueCountAggregationInput'; + + +export function addAggregationInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + addDateRangeInput({glue}); + addGeoPointInput({glue}); + addNumberRangeInput({glue}); + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION, + description: 'Aggregation input type', + fields: { + subAggregations: { + type: list(reference(GQL_INPUT_TYPE_AGGREGATION)) + }, + name: { + type: GraphQLString + }, + terms: { + type: addTermsAggregationInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_AGGREGATION_TERMS) + }, + stats: { + type: addStatsAggregationInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_AGGREGATION_STATS) + }, + range: { + type: addRangeAggregationInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_AGGREGATION_RANGE) + }, + dateRange: { + type: addDateRangeAggregationInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_AGGREGATION_DATE_RANGE) + }, + dateHistogram: { + type: addDateHistogramAggregationInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_AGGREGATION_DATE_HISTOGRAM) + }, + geoDistance: { + type: addGeoDistanceAggregationInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_AGGREGATION_GEO_DISTANCE) + }, + min: { + type: addMinAggregationInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_AGGREGATION_MIN) + }, + max: { + type: addMaxAggregationInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_AGGREGATION_MAX) + }, + count: { + type: addValueCountAggregationInput({glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_AGGREGATION_VALUE_COUNT) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addDateHistogramAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addDateHistogramAggregationInput.ts new file mode 100644 index 00000000..e2006b12 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addDateHistogramAggregationInput.ts @@ -0,0 +1,41 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLInt, + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import { + GQL_INPUT_TYPE_AGGREGATION_GEO_DISTANCE +} from '../constants'; + + +export function addDateHistogramAggregationInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION_GEO_DISTANCE, + description: 'DateHistogram aggregation input type', + fields: { + field: { + type: nonNull(fieldType) + }, + interval: { + type: GraphQLString + }, + format: { + type: GraphQLString + }, + minDocCount: { + type: GraphQLInt + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addDateRangeAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addDateRangeAggregationInput.ts new file mode 100644 index 00000000..5fabe0f5 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addDateRangeAggregationInput.ts @@ -0,0 +1,38 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import { + GQL_INPUT_TYPE_AGGREGATION_DATE_RANGE, + GQL_INPUT_TYPE_DATE_RANGE +} from '../constants'; + + +export function addDateRangeAggregationInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION_DATE_RANGE, + description: 'DateRange aggregation input type', + fields: { + field: { + type: nonNull(fieldType) + }, + format: { + type: GraphQLString + }, + ranges: { + type: glue.getInputType(GQL_INPUT_TYPE_DATE_RANGE) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addDateRangeInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addDateRangeInput.ts new file mode 100644 index 00000000..c373d4ac --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addDateRangeInput.ts @@ -0,0 +1,22 @@ +import type {Glue} from '../../../utils/Glue'; + + +//@ts-ignore +import {GraphQLString} from '/lib/graphql'; +import {GQL_INPUT_TYPE_DATE_RANGE} from '../constants'; + + +export function addDateRangeInput({glue} :{glue :Glue}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_DATE_RANGE, + description: 'Number range input type', + fields: { + from: { + type: GraphQLString + }, + to: { + type: GraphQLString + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addGeoDistanceAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addGeoDistanceAggregationInput.ts new file mode 100644 index 00000000..0bb2414b --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addGeoDistanceAggregationInput.ts @@ -0,0 +1,42 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import { + GQL_INPUT_TYPE_AGGREGATION_DATE_HISTOGRAM, + GQL_INPUT_TYPE_GEO_POINT, + GQL_INPUT_TYPE_NUMBER_RANGE +} from '../constants'; + + +export function addGeoDistanceAggregationInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION_DATE_HISTOGRAM, + description: 'GeoDistance aggregation input type', + fields: { + field: { + type: nonNull(fieldType) + }, + unit: { + type: GraphQLString + }, + origin: { + type: glue.getInputType(GQL_INPUT_TYPE_GEO_POINT) + }, + ranges: { + type: glue.getInputType(GQL_INPUT_TYPE_NUMBER_RANGE) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addGeoPointInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addGeoPointInput.ts new file mode 100644 index 00000000..2bf2e725 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addGeoPointInput.ts @@ -0,0 +1,22 @@ +import type {Glue} from '../../../utils/Glue'; + + +//@ts-ignore +import {GraphQLString} from '/lib/graphql'; +import {GQL_INPUT_TYPE_GEO_POINT} from '../constants'; + + +export function addGeoPointInput({glue} :{glue :Glue}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_GEO_POINT, + description: 'GeoPoint range input type', + fields: { + lat: { + type: GraphQLString + }, + lon: { + type: GraphQLString + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addMaxAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addMaxAggregationInput.ts new file mode 100644 index 00000000..bc7fa7df --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addMaxAggregationInput.ts @@ -0,0 +1,29 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INPUT_TYPE_AGGREGATION_MAX} from '../constants'; + + +export function addMaxAggregationInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION_MAX, + description: 'MaxAggregation input type', + fields: { + field: { + type: nonNull(fieldType) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addMinAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addMinAggregationInput.ts new file mode 100644 index 00000000..8e026f97 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addMinAggregationInput.ts @@ -0,0 +1,29 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INPUT_TYPE_AGGREGATION_MIN} from '../constants'; + + +export function addMinAggregationInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION_MIN, + description: 'MinAggregation input type', + fields: { + field: { + type: nonNull(fieldType) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addNumberRangeInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addNumberRangeInput.ts new file mode 100644 index 00000000..3c183829 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addNumberRangeInput.ts @@ -0,0 +1,22 @@ +import type {Glue} from '../../../utils/Glue'; + + +//@ts-ignore +import {GraphQLFloat} from '/lib/graphql'; +import {GQL_INPUT_TYPE_NUMBER_RANGE} from '../constants'; + + +export function addNumberRangeInput({glue} :{glue :Glue}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_NUMBER_RANGE, + description: 'Number range input type', + fields: { + from: { + type: GraphQLFloat + }, + to: { + type: GraphQLFloat + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addRangeAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addRangeAggregationInput.ts new file mode 100644 index 00000000..9e06686e --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addRangeAggregationInput.ts @@ -0,0 +1,35 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import { + GQL_INPUT_TYPE_AGGREGATION_RANGE, + GQL_INPUT_TYPE_NUMBER_RANGE +} from '../constants'; + + +export function addRangeAggregationInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION_RANGE, + description: 'Range aggregation input type', + fields: { + field: { + type: nonNull(fieldType) + }, + ranges: { + type: glue.getInputType(GQL_INPUT_TYPE_NUMBER_RANGE) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addStatsAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addStatsAggregationInput.ts new file mode 100644 index 00000000..50576193 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addStatsAggregationInput.ts @@ -0,0 +1,29 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INPUT_TYPE_AGGREGATION_STATS} from '../constants'; + + +export function addStatsAggregationInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION_STATS, + description: 'Stats aggregation input type', + fields: { + field: { + type: nonNull(fieldType) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addTermsAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addTermsAggregationInput.ts new file mode 100644 index 00000000..24e3fa39 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addTermsAggregationInput.ts @@ -0,0 +1,39 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLInt, + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INPUT_TYPE_AGGREGATION_TERMS} from '../constants'; + + +export function addTermsAggregationInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION_TERMS, + description: 'Terms aggregation input type', + fields: { + field: { + type: nonNull(fieldType) + }, + order: { + type: GraphQLString + }, + size: { + type: GraphQLInt + }, + minDocCount: { + type: GraphQLInt + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addValueCountAggregationInput.ts b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addValueCountAggregationInput.ts new file mode 100644 index 00000000..51c55e90 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/aggregations/guillotine/input/addValueCountAggregationInput.ts @@ -0,0 +1,22 @@ +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INPUT_TYPE_AGGREGATION_VALUE_COUNT} from '../constants'; + + +export function addValueCountAggregationInput({glue} :{glue :Glue}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_AGGREGATION_VALUE_COUNT, + description: 'ValueCount Aggregation input type', + fields: { + field: { + type: nonNull(GraphQLString) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/constants.ts b/src/main/resources/lib/explorer/interface/graphql/constants.ts new file mode 100644 index 00000000..d65d2b20 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/constants.ts @@ -0,0 +1 @@ +export const VALUE_TYPE_JSON = 'JSON'; diff --git a/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/constants.ts b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/constants.ts new file mode 100644 index 00000000..e2aba0c1 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/constants.ts @@ -0,0 +1,6 @@ +export const GQL_INPUT_TYPE_FILTER = 'FilterInput'; +export const GQL_INPUT_TYPE_FILTER_BOOLEAN = 'BooleanFilterInput'; +export const GQL_INPUT_TYPE_FILTER_EXISTS = 'ExistsFilterInput'; +export const GQL_INPUT_TYPE_FILTER_HAS_VALUE = 'HasValueFilterInput'; +export const GQL_INPUT_TYPE_FILTER_IDS = 'IdsFilterInput'; +export const GQL_INPUT_TYPE_FILTER_NOT_EXISTS = 'NotExistsFilterInput'; diff --git a/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addBooleanFilterInput.ts b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addBooleanFilterInput.ts new file mode 100644 index 00000000..5538d860 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addBooleanFilterInput.ts @@ -0,0 +1,31 @@ +import type {Glue} from '../../../utils/Glue'; + + +import { + list, + reference + //@ts-ignore +} from '/lib/graphql'; +import { + GQL_INPUT_TYPE_FILTER, + GQL_INPUT_TYPE_FILTER_BOOLEAN +} from '../constants'; + + +export function addBooleanFilterInput({glue} :{glue :Glue}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_FILTER_BOOLEAN, + description: 'BooleanFilter input type', + fields: { + must: { + type: list(reference(GQL_INPUT_TYPE_FILTER)) + }, + mustNot: { + type: list(reference(GQL_INPUT_TYPE_FILTER)) + }, + should: { + type: list(reference(GQL_INPUT_TYPE_FILTER)) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addExistsFilterInput.ts b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addExistsFilterInput.ts new file mode 100644 index 00000000..bfd1c352 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addExistsFilterInput.ts @@ -0,0 +1,29 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INPUT_TYPE_FILTER_EXISTS} from '../constants'; + + +export function addExistsFilterInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_FILTER_EXISTS, + description: 'ExistsFilter input type', + fields: { + field: { + type: nonNull(fieldType) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addFilterInput.ts b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addFilterInput.ts new file mode 100644 index 00000000..8c71f623 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addFilterInput.ts @@ -0,0 +1,54 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + +//@ts-ignore +import {GraphQLString} from '/lib/graphql'; +import { + GQL_INPUT_TYPE_FILTER//, + //GQL_INPUT_TYPE_FILTER_BOOLEAN, + //GQL_INPUT_TYPE_FILTER_EXISTS, + //GQL_INPUT_TYPE_FILTER_HAS_VALUE, + //GQL_INPUT_TYPE_FILTER_IDS, + //GQL_INPUT_TYPE_FILTER_NOT_EXISTS +} from '../constants'; +import {addBooleanFilterInput} from './addBooleanFilterInput'; +import {addExistsFilterInput} from './addExistsFilterInput'; +import {addNotExistsFilterInput} from './addNotExistsFilterInput'; +import {addHasValueFilterInput} from './addHasValueFilterInput'; +import {addIdsFilterInput} from './addIdsFilterInput'; + + +export function addFilterInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_FILTER, + description: 'Filter input type', + fields: { + boolean: { + type: addBooleanFilterInput({glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_FILTER_BOOLEAN) + }, + exists: { + type: addExistsFilterInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_FILTER_EXISTS) + }, + notExists: { + type: addNotExistsFilterInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_FILTER_NOT_EXISTS) + }, + hasValue: { + type: addHasValueFilterInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_FILTER_HAS_VALUE) + }, + ids: { + type: addIdsFilterInput({fieldType, glue}) + //type: glue.getInputType(GQL_INPUT_TYPE_FILTER_IDS) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addHasValueFilterInput.ts b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addHasValueFilterInput.ts new file mode 100644 index 00000000..f5047e0d --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addHasValueFilterInput.ts @@ -0,0 +1,45 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLString, + list, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INPUT_TYPE_FILTER_HAS_VALUE} from '../constants'; + + +export function addHasValueFilterInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_FILTER_HAS_VALUE, + description: 'HasValueFilter input type', + fields: { + field: { + type: nonNull(fieldType) + }, + stringValues: { + type: list(GraphQLString) + }, + intValues: { + type: list(GraphQLInt) + }, + floatValues: { + type: list(GraphQLFloat) + }, + booleanValues: { + type: list(GraphQLBoolean) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addIdsFilterInput.ts b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addIdsFilterInput.ts new file mode 100644 index 00000000..e0a0ec52 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addIdsFilterInput.ts @@ -0,0 +1,29 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + list + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INPUT_TYPE_FILTER_IDS} from '../constants'; + + +export function addIdsFilterInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_FILTER_IDS, + description: 'IdsFilter input type', + fields: { + values: { + type: list(fieldType) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addNotExistsFilterInput.ts b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addNotExistsFilterInput.ts new file mode 100644 index 00000000..6895f08b --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/filters/guillotine/input/addNotExistsFilterInput.ts @@ -0,0 +1,29 @@ +import type {GraphQL} from '../../../index.d'; +import type {Glue} from '../../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INPUT_TYPE_FILTER_NOT_EXISTS} from '../constants'; + + +export function addNotExistsFilterInput({ + fieldType = GraphQLString, // What guillotine uses + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_FILTER_NOT_EXISTS, + description: 'NotExistsFilter input type', + fields: { + field: { + type: nonNull(fieldType) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/getCachedSchema.ts b/src/main/resources/lib/explorer/interface/graphql/getCachedSchema.ts new file mode 100644 index 00000000..322d4235 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/getCachedSchema.ts @@ -0,0 +1,59 @@ +import type {CustomEvent} from '@enonic/js-utils/src/types/index.d'; +import type {DocumentTypeNode} from '/lib/explorer/types/index.d'; + + +//@ts-ignore +import {newCache} from '/lib/cache'; +import { + EVENT_LISTEN_TYPE_CUSTOM_EXPLORER_DOCUMENTTYPE_CREATED, + EVENT_LISTEN_TYPE_CUSTOM_EXPLORER_DOCUMENTTYPE_UPDATED//, + //FIELD_PATH_META +} from '/lib/explorer/constants'; +import {makeSchema} from '/lib/explorer/interface/graphql/makeSchema'; +//@ts-ignore +import {listener} from '/lib/xp/event'; + + +const SECONDS_TO_CACHE = 3600; // One hour + + +const schemaCache = newCache({ + size: 1, + expire: SECONDS_TO_CACHE +}); + + +export function getCachedSchema() { + return schemaCache.get('static-key', () => { + //log.debug('Caching a new Interface GraphQL Schema for %s seconds', SECONDS_TO_CACHE); + return makeSchema(); + }); +} + + +/*log.debug( + 'Starting event listener for %s and %s', + EVENT_LISTEN_TYPE_CUSTOM_EXPLORER_DOCUMENTTYPE_CREATED, + EVENT_LISTEN_TYPE_CUSTOM_EXPLORER_DOCUMENTTYPE_UPDATED +);*/ +listener({ + type: 'custom.*', + localOnly: false, + callback: (event :CustomEvent< + typeof EVENT_LISTEN_TYPE_CUSTOM_EXPLORER_DOCUMENTTYPE_CREATED + |typeof EVENT_LISTEN_TYPE_CUSTOM_EXPLORER_DOCUMENTTYPE_UPDATED, + DocumentTypeNode + >) => { + //log.debug('custom.* event:%s', toStr(event)); + const {type} = event; + if ( + type === EVENT_LISTEN_TYPE_CUSTOM_EXPLORER_DOCUMENTTYPE_CREATED + || type === EVENT_LISTEN_TYPE_CUSTOM_EXPLORER_DOCUMENTTYPE_UPDATED + ) { + //const {_id} = event.data; + //log.debug('_id:%s', _id); + //log.debug('Clearing cached Interface GraphQL Schema'); + schemaCache.clear(); + } + } +}); diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumHighlightOptionEncoders.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumHighlightOptionEncoders.ts new file mode 100644 index 00000000..d646af80 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumHighlightOptionEncoders.ts @@ -0,0 +1,13 @@ +import type {Glue} from '../../utils/Glue'; + + +import {HIGHLIGHT_OPTION_ENCODERS} from '@enonic/js-utils'; +import {GQL_ENUM_HIGHLIGHT_OPTION_ENCODERS} from './constants'; + + +export function addEnumHighlightOptionEncoders({glue} :{glue :Glue}) { + return glue.addEnumType({ + name: GQL_ENUM_HIGHLIGHT_OPTION_ENCODERS, + values: HIGHLIGHT_OPTION_ENCODERS + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumTypeHighlightOptionFragmenter.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumTypeHighlightOptionFragmenter.ts new file mode 100644 index 00000000..3239595c --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumTypeHighlightOptionFragmenter.ts @@ -0,0 +1,15 @@ +import type {Glue} from '../../utils/Glue'; + + +import {GQL_ENUM_HIGHLIGHT_OPTION_FRAGMENTERS} from './constants'; + + +export function addEnumTypeHighlightOptionFragmenter({glue} :{glue :Glue}) { + return glue.addEnumType({ + name: GQL_ENUM_HIGHLIGHT_OPTION_FRAGMENTERS, + values: [ + 'simple', + 'span' // default + ] + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumTypeHighlightOptionOrder.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumTypeHighlightOptionOrder.ts new file mode 100644 index 00000000..3a04dcf8 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumTypeHighlightOptionOrder.ts @@ -0,0 +1,15 @@ +import type {Glue} from '../../utils/Glue'; + + +import {GQL_ENUM_HIGHLIGHT_OPTION_ORDERS} from './constants'; + + +export function addEnumTypeHighlightOptionOrder({glue} :{glue :Glue}) { + return glue.addEnumType({ + name: GQL_ENUM_HIGHLIGHT_OPTION_ORDERS, + values: [ + 'none', // default + 'score' + ] + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumTypeHighlightOptionTagSchema.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumTypeHighlightOptionTagSchema.ts new file mode 100644 index 00000000..2703f84f --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addEnumTypeHighlightOptionTagSchema.ts @@ -0,0 +1,14 @@ +import type {Glue} from '../../utils/Glue'; + + +import {GQL_ENUM_HIGHLIGHT_OPTION_TAG_SCHEMAS} from './constants'; + + +export function addEnumTypeHighlightOptionTagSchema({glue} :{glue :Glue}) { + return glue.addEnumType({ + name: GQL_ENUM_HIGHLIGHT_OPTION_TAG_SCHEMAS, + values: [ + 'styled' // default is undefined + ] + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/addInputFieldsHighlightPropertyOptions.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addInputFieldsHighlightPropertyOptions.ts new file mode 100644 index 00000000..8b1011de --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addInputFieldsHighlightPropertyOptions.ts @@ -0,0 +1,39 @@ +import type {Glue} from '../../utils/Glue'; + + +import { + GraphQLBoolean, + GraphQLInt, + GraphQLString + //@ts-ignore +} from '/lib/graphql'; +import { + //GQL_ENUM_HIGHLIGHT_OPTION_FRAGMENTERS, + //GQL_ENUM_HIGHLIGHT_OPTION_ORDERS, + GQL_INPUT_FIELDS_HIGHLIGHT_PROPERTY_OPTIONS +} from './constants'; +import {addEnumTypeHighlightOptionFragmenter} from './addEnumTypeHighlightOptionFragmenter'; +import {addEnumTypeHighlightOptionOrder} from './addEnumTypeHighlightOptionOrder'; + + +export function addInputFieldsHighlightPropertyOptions({glue} :{glue :Glue}) { + return glue.addInputFields({ + name: GQL_INPUT_FIELDS_HIGHLIGHT_PROPERTY_OPTIONS, + fields: { + fragmenter: { + type: addEnumTypeHighlightOptionFragmenter({glue}) + //type: glue.getEnumType(GQL_ENUM_HIGHLIGHT_OPTION_FRAGMENTERS) + }, + fragmentSize: { type: GraphQLInt }, + noMatchSize: { type: GraphQLInt }, + numberOfFragments: { type: GraphQLInt }, + order: { + type: addEnumTypeHighlightOptionOrder({glue}) + //type: glue.getEnumType(GQL_ENUM_HIGHLIGHT_OPTION_ORDERS) + }, + postTag: { type: GraphQLString }, + preTag: { type: GraphQLString }, + requireFieldMatch: { type: GraphQLBoolean } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/addInputTypeHighlight.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addInputTypeHighlight.ts new file mode 100644 index 00000000..a3ebf17d --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addInputTypeHighlight.ts @@ -0,0 +1,55 @@ +import type {GraphQL} from '../../index.d'; +import type {Glue} from '../../utils/Glue'; + + +import { + GraphQLString, + list, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import { + //GQL_ENUM_HIGHLIGHT_OPTION_ENCODERS, + //GQL_ENUM_HIGHLIGHT_OPTION_TAG_SCHEMAS, + GQL_INPUT_FIELDS_HIGHLIGHT_PROPERTY_OPTIONS, + GQL_INPUT_TYPE_HIGHLIGHT//, + //GQL_INPUT_TYPE_HIGHLIGHT_PROPERTY +} from './constants' +import {addEnumHighlightOptionEncoders} from './addEnumHighlightOptionEncoders'; +import {addEnumTypeHighlightOptionTagSchema} from './addEnumTypeHighlightOptionTagSchema'; +import {addInputFieldsHighlightPropertyOptions} from './addInputFieldsHighlightPropertyOptions'; +import {addInputTypeHighlightProperty} from './addInputTypeHighlightProperty'; + + +export function addInputTypeHighlight({ + fieldType = GraphQLString, + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + addInputFieldsHighlightPropertyOptions({glue}); // Initializes GQL_INPUT_FIELDS_HIGHLIGHT_PROPERTY_OPTIONS + return glue.addInputType({ + name: GQL_INPUT_TYPE_HIGHLIGHT, + //description: '', + fields: { + encoder: { // Global only + type: addEnumHighlightOptionEncoders({glue}) + //type: glue.getEnumType(GQL_ENUM_HIGHLIGHT_OPTION_ENCODERS) + }, + //...addInputFieldsHighlightPropertyOptions({glue}), + ...glue.getInputFields(GQL_INPUT_FIELDS_HIGHLIGHT_PROPERTY_OPTIONS), + fields: { + type: nonNull(list(addInputTypeHighlightProperty({ + fieldType, + glue + }))) + //type: list(glue.getInputType(GQL_INPUT_TYPE_HIGHLIGHT_PROPERTY)) + }, + tagsSchema: { // Global only + type: addEnumTypeHighlightOptionTagSchema({glue}) + //type: glue.getEnumType(GQL_ENUM_HIGHLIGHT_OPTION_TAG_SCHEMAS) + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/addInputTypeHighlightProperty.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addInputTypeHighlightProperty.ts new file mode 100644 index 00000000..2b551628 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/addInputTypeHighlightProperty.ts @@ -0,0 +1,30 @@ +import type {GraphQL} from '../../index.d'; +import type {Glue} from '../../utils/Glue'; + + +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import { + GQL_INPUT_FIELDS_HIGHLIGHT_PROPERTY_OPTIONS, + GQL_INPUT_TYPE_HIGHLIGHT_PROPERTY +} from './constants'; + + +export function addInputTypeHighlightProperty({ + fieldType = GraphQLString, + glue +} :{ + fieldType ?:GraphQL.ArgsType + glue :Glue +}) { + return glue.addInputType({ + name: GQL_INPUT_TYPE_HIGHLIGHT_PROPERTY, + fields: { + field: { type: nonNull(fieldType) }, + ...glue.getInputFields(GQL_INPUT_FIELDS_HIGHLIGHT_PROPERTY_OPTIONS) + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/constants.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/constants.ts new file mode 100644 index 00000000..406c952f --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/constants.ts @@ -0,0 +1,9 @@ +export const GQL_ENUM_HIGHLIGHT_OPTION_ENCODERS = 'EnumHighlightOptionEncoders'; +export const GQL_ENUM_HIGHLIGHT_OPTION_FRAGMENTERS = 'EnumTypeHighlightOptionFragmenter'; +export const GQL_ENUM_HIGHLIGHT_OPTION_ORDERS = 'EnumTypeHighlightOptionOrder'; +export const GQL_ENUM_HIGHLIGHT_OPTION_TAG_SCHEMAS = 'EnumTypeHighlightOptionTagSchema'; + +export const GQL_INPUT_FIELDS_HIGHLIGHT_PROPERTY_OPTIONS = 'InputFieldsHighlightPropertyOptions'; + +export const GQL_INPUT_TYPE_HIGHLIGHT = 'InputTypeHighlight'; +export const GQL_INPUT_TYPE_HIGHLIGHT_PROPERTY = 'InputTypeHighlightProperty'; diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/highlightGQLArgToEnonicXPQuery.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/highlightGQLArgToEnonicXPQuery.ts new file mode 100644 index 00000000..2b1e3140 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/highlightGQLArgToEnonicXPQuery.ts @@ -0,0 +1,31 @@ +import type {Highlight} from './index.d'; + + +//import {toStr} from '@enonic/js-utils'; + + +export function highlightGQLArgToEnonicXPQuery({ + highlightArg +} :{ + highlightArg :Highlight +}) { + //log.debug('highlightGQLArgToEnonicXPQuery highlightArg:%s', toStr(highlightArg)); + const highlight = { + properties: {} + }; + const keys = Object.keys(highlightArg); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + //log.debug('highlightGQLArgToEnonicXPQuery i:%s key:%s', i, key); + if (key === 'fields') { + for (let j = 0; j < highlightArg.fields.length; j++) { + //log.debug('highlightGQLArgToEnonicXPQuery highlightArg.properties[%s]:%s', j, toStr(highlightArg.properties[j])); + const {field, ...rest} = highlightArg.fields[j]; + highlight.properties[field] = rest; + } + } else { + highlight[key] = highlightArg[key]; + } + } + return highlight; +} diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/input/index.d.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/input/index.d.ts new file mode 100644 index 00000000..7b8cfd26 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/input/index.d.ts @@ -0,0 +1,17 @@ +export type HightlightPropertyOptions = { + field :string + fragmenter ?:'simple'|'span' + fragmentSize ?:number + noMatchSize ?:number + numberOfFragments ?:number + order ?:string + postTag ?:string + preTag ?:string + requireFieldMatch ?:boolean +}; + +export type Highlight = { + encoder ?:'default'|'html' + fields :Array + tagsSchema ?:'styled' +} & HightlightPropertyOptions; diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/output/index.d.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/output/index.d.ts new file mode 100644 index 00000000..e69adcd4 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/output/index.d.ts @@ -0,0 +1,4 @@ +export type HighlightArray = Array<{ + field :string + highlights :Array +}> diff --git a/src/main/resources/lib/explorer/interface/graphql/highlight/output/queryResHighlightObjToArray.ts b/src/main/resources/lib/explorer/interface/graphql/highlight/output/queryResHighlightObjToArray.ts new file mode 100644 index 00000000..2753c75b --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/highlight/output/queryResHighlightObjToArray.ts @@ -0,0 +1,20 @@ +import type {HighlightArray} from './index.d'; + + +export function queryResHighlightObjToArray({ + highlightObj +} :{ + highlightObj ?:Record> +}) :HighlightArray|null { + if (!highlightObj) { return null; } + const highlightArray = []; + const keys = Object.keys(highlightObj); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + highlightArray.push({ + field: key, + highlights: highlightObj[key] + }); + } + return highlightArray; +} diff --git a/src/main/resources/lib/explorer/interface/graphql/index.d.ts b/src/main/resources/lib/explorer/interface/graphql/index.d.ts new file mode 100644 index 00000000..b0750703 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/index.d.ts @@ -0,0 +1,14 @@ +export namespace GraphQL { + export type EnumType = unknown + export type EnumValues = Array|Record + + /*export type ScalarType = + |typeof GraphQLInt // These are Java types, so typeof won't work well on them... + |typeof GraphQLString + |... + */ + export type ScalarType = unknown + + export type InputObjectType = unknown + export type ArgsType = ScalarType|InputObjectType +} diff --git a/src/main/resources/lib/explorer/interface/graphql/makeSchema.ts b/src/main/resources/lib/explorer/interface/graphql/makeSchema.ts new file mode 100644 index 00000000..3208c7ed --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/makeSchema.ts @@ -0,0 +1,138 @@ +import type { + SearchConnectionResolverEnv, + SearchResolverEnv, + SearchResolverReturnType +} from '/lib/explorer/interface/graphql/output/index.d'; + + +//import {toStr} from '@enonic/js-utils'; +import { + GraphQLInt, + GraphQLString, + newSchemaGenerator, + list + //@ts-ignore +} from '/lib/graphql'; +import { + decodeCursor//, + //encodeCursor // Just use to generate after for testing + //@ts-ignore +} from '/lib/graphql-connection'; + +import {constructGlue} from './utils/Glue'; + +// Input +import {addAggregationInput} from '/lib/explorer/interface/graphql/aggregations/guillotine/input/addAggregationInput'; +import {addFilterInput} from '/lib/explorer/interface/graphql/filters/guillotine/input/addFilterInput'; +import {addInputTypeHighlight} from '/lib/explorer/interface/graphql/highlight/input/addInputTypeHighlight'; + +// Output +import {searchResolver} from '/lib/explorer/interface/graphql/output/searchResolver'; +import {addDocumentTypeObjectTypes} from '/lib/explorer/interface/graphql/output/addDocumentTypeObjectTypes'; +import {addObjectTypeSearchConnection} from '/lib/explorer/interface/graphql/output/addObjectTypeSearchConnection'; +import {addObjectTypeSearchResult} from '/lib/explorer/interface/graphql/output/addObjectTypeSearchResult'; + + +export function makeSchema() { + const schemaGenerator = newSchemaGenerator(); + const glue = constructGlue({schemaGenerator}); + + const documentTypeObjectTypes = {}; // Defined before addDynamicInterfaceTypes, populated after + const camelToFieldObj :Record = {}; + addDocumentTypeObjectTypes({ // Does addDynamicInterfaceTypes for us :) + camelToFieldObj, // modified within + documentTypeObjectTypes, // modified within + glue + }); + //log.debug('makeSchema camelToFieldObj:%s', toStr(camelToFieldObj)); + + /*const fieldsEnumType = glue.addEnumType({ + name: 'Fields', + values: { + _collection: `${FIELD_PATH_META}.collection`, + _createdTime: `${FIELD_PATH_META}.createdTime`, + _documentType: `${FIELD_PATH_META}.documentType`, + _modifiedTime: `${FIELD_PATH_META}.modifiedTime`, + ...camelToFieldObj, // Must be populated first! + } + }); + + const highlightFieldsEnumType = glue.addEnumType({ + name: 'HighlightFields', + values: { + _alltext: '_alltext', + ...camelToFieldObj // Must be populated first! + } + });*/ + + const commonGQLInputFields = { + aggregations: list(addAggregationInput({ + //fieldType: fieldsEnumType, + glue + })), + filters: list(addFilterInput({ + //fieldType: fieldsEnumType, + glue + })), + highlight: addInputTypeHighlight({ + //fieldType: highlightFieldsEnumType, + glue + }), + searchString: GraphQLString, + } + + glue.addQueryField({ + args: { + ...commonGQLInputFields, + after: GraphQLString, + first: GraphQLInt, + }, + name: 'getSearchConnection', + resolve(env) { + //log.debug(`env:${toStr({env})}`); + const { + after,// = encodeCursor('0'), // encoded representation of start + aggregations, + filters, + first = 10, // count + highlight, + searchString + } = env.args; + //log.debug('after:%s', toStr(after)); + //log.debug('first:%s', toStr(first)); + //log.debug("encodeCursor('0'):%s", toStr(encodeCursor('0'))); // MA== + //log.debug("encodeCursor('1'):%s", toStr(encodeCursor('1'))); // MQ== + //log.debug("encodeCursor('2'):%s", toStr(encodeCursor('2'))); // Mg== + + const start = after ? parseInt(decodeCursor(after)) + 1 : 0; + //log.debug('start:%s', toStr(start)); + + const res = searchResolver({ + args: { + aggregations, + count: first, + filters, + highlight, + searchString, + start + }, + context: env.context + }); + return res; + }, + type: addObjectTypeSearchConnection({glue}) + }); + + glue.addQueryField({ + args: { // GraphQL input types + ...commonGQLInputFields, + count: GraphQLInt, + start: GraphQLInt + }, + name: 'search', + resolve: (env) => searchResolver(env), + type: addObjectTypeSearchResult({glue}) + }); // addQueryField search + + return glue.buildSchema(); +} // makeSchema diff --git a/src/main/resources/lib/explorer/interface/graphql/output/addDocumentTypeObjectTypes.ts b/src/main/resources/lib/explorer/interface/graphql/output/addDocumentTypeObjectTypes.ts new file mode 100644 index 00000000..9e159094 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/addDocumentTypeObjectTypes.ts @@ -0,0 +1,110 @@ +import type {GraphQLObjectType} from '../utils/index.d'; +import type {Glue} from '../utils/Glue'; + + +import { + VALUE_TYPE_DOUBLE, + VALUE_TYPE_STRING, + sortKeys//, + //toStr +} from '@enonic/js-utils'; +import {PRINCIPAL_EXPLORER_READ} from '/lib/explorer/model/2/constants'; +import {queryDocumentTypes} from '/lib/explorer/documentType/queryDocumentTypes'; +import {connect} from '/lib/explorer/repo/connect'; +import { + Json as GraphQLJson + //@ts-ignore +} from '/lib/graphql'; +import {VALUE_TYPE_JSON} from '../constants'; +import {documentTypeNameToGraphQLObjectTypeName} from '../utils/documentTypeNameToGraphQLObjectTypeName'; +import {mergeFields} from '../utils/mergeFields'; +import {objToGraphQL} from '../utils/objToGraphQL'; +import {addInterfaceTypeDocument} from './addInterfaceTypeDocument'; + + +export function addDocumentTypeObjectTypes({ + camelToFieldObj, // modified + documentTypeObjectTypes, + glue +} : { + camelToFieldObj :Record // TODO + documentTypeObjectTypes :Record + glue :Glue +}) { + const documentTypes = queryDocumentTypes({ + readConnection: connect({ principals: [PRINCIPAL_EXPLORER_READ] }) + }); + const interfaces = [ + addInterfaceTypeDocument({ + documentTypeObjectTypes, // Just an empty obj, populated later + glue, + }) + ]; + //log.debug('addDocumentTypeObjectTypes interfaces:%s', toStr(interfaces)); + + for (let i = 0; i < documentTypes.hits.length; i++) { + const { + _name: documentTypeName, + properties + } = documentTypes.hits[i]; + //log.debug('addDocumentTypeObjectTypes documentTypeName:%s properties:%s', documentTypeName, toStr(properties)); + + const mergedglobalFieldsObj = mergeFields({ + camelToFieldObj, // modified + globalFieldsObj: { + _collection: { + _max: 1, + _min: 1, + _valueType: VALUE_TYPE_STRING + }, + _createdTime: { + _max: 1, + _min: 1, + _valueType: VALUE_TYPE_STRING + }, + _documentType: { + _max: 1, + _min: 1, + _valueType: VALUE_TYPE_STRING + }, + _json: { + _max: 1, + _min: 1, + _valueType: VALUE_TYPE_JSON + }, + _modifiedTime: { + _max: 1, + _min: 0, + _valueType: VALUE_TYPE_STRING + }, + _score: { + _max: 1, + _min: 1, + _valueType: VALUE_TYPE_DOUBLE + } + }, // just read + properties // just read + }); + //log.debug('addDocumentTypeObjectTypes documentTypeName:%s camelToFieldObj:%s', documentTypeName, toStr(camelToFieldObj)); + //log.debug('addDocumentTypeObjectTypes documentTypeName:%s mergedglobalFieldsObj:%s', documentTypeName, toStr(mergedglobalFieldsObj)); + + const fields = { + ...objToGraphQL({ + documentTypeName, + glue, + obj: mergedglobalFieldsObj + }), + _highlight: { type: GraphQLJson } + }; + + const sortedFields = sortKeys(fields); + //log.debug('addDocumentTypeObjectTypes documentTypeName:%s sortedFields:%s', documentTypeName, toStr(sortedFields)); + + documentTypeObjectTypes[documentTypeName] = glue.addObjectType({ + name: documentTypeNameToGraphQLObjectTypeName(documentTypeName), + fields: sortedFields, + interfaces + }); + } + //log.debug('addDocumentTypeObjectTypes camelToFieldObj:%s', toStr(camelToFieldObj)); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/addInterfaceTypeDocument.ts b/src/main/resources/lib/explorer/interface/graphql/output/addInterfaceTypeDocument.ts new file mode 100644 index 00000000..bbea8bcd --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/addInterfaceTypeDocument.ts @@ -0,0 +1,28 @@ +import type {GraphQLObjectType} from '../utils/index.d'; +import type {Glue} from '../utils/Glue'; +import type {Hit} from './index.d'; + + +//import {toStr} from '@enonic/js-utils'; +import {GQL_INTERFACE_TYPE_DOCUMENT} from './constants'; +import {addOutputFieldsSearchResultHit} from './addOutputFieldsSearchResultHit'; + + +export function addInterfaceTypeDocument({ + documentTypeObjectTypes, // Just an empty obj, populated later + glue, +} :{ + documentTypeObjectTypes :Record + glue :Glue +}) { + return glue.addInterfaceType({ + name: GQL_INTERFACE_TYPE_DOCUMENT, + fields: addOutputFieldsSearchResultHit({glue}), + typeResolver(node) { + //log.debug('Document InterfaceType typeResolver node:%s', toStr(node)); + const {_documentType} = node; + //log.debug('_documentTypeName:%s', _documentType); + return documentTypeObjectTypes[_documentType]; // eslint-disable-line no-underscore-dangle + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchConnection.ts b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchConnection.ts new file mode 100644 index 00000000..0486e873 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchConnection.ts @@ -0,0 +1,70 @@ +import type {Glue} from '../utils/Glue'; +import type { + EmptyObject, + GraphQLContext, + SearchResolverReturnType +} from './index.d'; + + +//import {toStr} from '@enonic/js-utils'; +import { + Json as GraphQLJson, + GraphQLInt, + nonNull, + list + //@ts-ignore +} from '/lib/graphql'; +import {addObjectTypeSearchConnectionEdge} from './addObjectTypeSearchConnectionEdge'; +import {addObjectTypeSearchConnectionPageInfo} from './addObjectTypeSearchConnectionPageInfo'; + + +type SearchConnectionEnv = { + args :EmptyObject + context :GraphQLContext, + source :SearchResolverReturnType +} + + +export function addObjectTypeSearchConnection({glue} :{glue :Glue}) { + return glue.addObjectType({ + name: 'SearchConnection', + fields: { + totalCount: { + resolve: (env :SearchConnectionEnv) => { + //log.debug('SearchConnection totalCount resolve env:%s', toStr(env)); + return env.source.total; + }, + type: nonNull(GraphQLInt) + }, + edges: { + resolve(env :SearchConnectionEnv) { + //log.debug('SearchConnection edges resolve env:%s', toStr(env)); + const hits = env.source.hits; + const edges = []; + for (let i = 0; i < hits.length; i++) { + edges.push({ + node: hits[i], + cursor: env.source.start + i + }); + } + //log.debug(`edges:${toStr({edges})}`); + return edges; + }, + type: list(addObjectTypeSearchConnectionEdge({glue})) + }, + pageInfo: { + resolve(env :SearchConnectionEnv) { + //log.debug('SearchConnection pageInfo resolve env:%s', toStr(env)); + const count = env.source.hits.length; + return { + startCursor: env.source.start, + endCursor: env.source.start + (count === 0 ? 0 : (count - 1)), + hasNext: (env.source.start + count) < env.source.total + }; + }, + type: addObjectTypeSearchConnectionPageInfo({glue}) + }, + aggregationsAsJson: { type: GraphQLJson } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchConnectionEdge.ts b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchConnectionEdge.ts new file mode 100644 index 00000000..17a62a56 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchConnectionEdge.ts @@ -0,0 +1,50 @@ +import type {Glue} from '../utils/Glue'; +import type { + EmptyObject, + GraphQLContext, + Hit +} from './index.d'; + + +//import {toStr} from '@enonic/js-utils'; +import { + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INTERFACE_TYPE_DOCUMENT} from './constants'; +//import {addObjectTypeSearchResultHit} from './addObjectTypeSearchResultHit'; + + +type SearchConnectionEdgeEnv = { + args :EmptyObject + context :GraphQLContext, + source :{ + cursor :number + node :Hit + } +} + + +export function addObjectTypeSearchConnectionEdge({glue} :{glue :Glue}) { + return glue.addObjectType({ + name: 'SearchConnectionEdge', + fields: { + cursor: { + type: nonNull(GraphQLString), + resolve(env :SearchConnectionEdgeEnv) { + //log.debug('SearchConnectionEdge cursor resolve env:%s', toStr(env)); + return env.source.cursor; + } + }, + node: { + //type: addObjectTypeSearchResultHit({glue}), + type: glue.getInterfaceType(GQL_INTERFACE_TYPE_DOCUMENT), + resolve(env :SearchConnectionEdgeEnv) { + //log.debug('SearchConnectionEdge node resolve env:%s', toStr(env)); + return env.source.node; + } + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchConnectionPageInfo.ts b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchConnectionPageInfo.ts new file mode 100644 index 00000000..3a1e2bcb --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchConnectionPageInfo.ts @@ -0,0 +1,57 @@ +import type {Glue} from '../utils/Glue'; +import type { + EmptyObject, + GraphQLContext +} from './index.d'; + + +//import {toStr} from '@enonic/js-utils'; +import { + GraphQLString, + GraphQLBoolean, + nonNull + //@ts-ignore +} from '/lib/graphql'; +//@ts-ignore +import {encodeCursor} from '/lib/graphql-connection'; + + +type SearchConnectionPageInfoEnv = { + args :EmptyObject + context :GraphQLContext, + source :{ + endCursor :number + hasNext :boolean + startCursor :number + } +} + + +export function addObjectTypeSearchConnectionPageInfo({glue} :{glue :Glue}) { + return glue.addObjectType({ + name: 'SearchConnectionPageInfo', + fields: { + endCursor: { + type: nonNull(GraphQLString), + resolve: (env :SearchConnectionPageInfoEnv) => { + //log.debug('SearchConnectionPageInfo endCursor resolve env:%s', toStr(env)); + return encodeCursor(env.source.endCursor); + } + }, + hasNext: { + type: nonNull(GraphQLBoolean), + resolve: (env :SearchConnectionPageInfoEnv) => { + //log.debug('SearchConnectionPageInfo hasNext resolve env:%s', toStr(env)); + return env.source.hasNext; + } + }, + startCursor: { + type: nonNull(GraphQLString), + resolve: (env :SearchConnectionPageInfoEnv) => { + //log.debug('SearchConnectionPageInfo startCursor resolve env:%s', toStr(env)); + return encodeCursor(env.source.startCursor); + } + } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchResult.ts b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchResult.ts new file mode 100644 index 00000000..a966a862 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchResult.ts @@ -0,0 +1,44 @@ +import type {Glue} from '../utils/Glue'; + + +import { + Json as GraphQLJson, + GraphQLFloat, + GraphQLInt, + GraphQLString, + nonNull, + list + //@ts-ignore +} from '/lib/graphql'; +import {GQL_INTERFACE_TYPE_DOCUMENT} from './constants'; + + +export function addObjectTypeSearchResult({glue} :{glue :Glue}) { + return glue.addObjectType({ + name: 'SearchResult', + fields: { + aggregationsAsJson: { type: GraphQLJson }, + count: { type: nonNull(GraphQLInt) }, + hits: { type: list(glue.getInterfaceType(GQL_INTERFACE_TYPE_DOCUMENT)) }, + //hits: { type: list(addObjectTypeSearchResultHit({glue})) }, + start: { type: nonNull(GraphQLInt) }, // Used in search connection + synonyms: { type: list(glue.addObjectType({ + name: 'SearchResultSynonyms', + fields: { + _highlight: { type: glue.addObjectType({ + name: 'SearchResultSynonymsHighlight', + fields: { + from: { type: list(GraphQLString) }, + to: { type: list(GraphQLString) } // Only when expand = true + } + })}, + _score: { type: GraphQLFloat }, + from: { type: nonNull(list(GraphQLString)) }, + thesaurusName: { type: nonNull(GraphQLString) }, + to: { type: nonNull(list(GraphQLString)) } + } + }))}, + total: { type: nonNull(GraphQLInt) } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchResultHit.ts b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchResultHit.ts new file mode 100644 index 00000000..ee469d62 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/addObjectTypeSearchResultHit.ts @@ -0,0 +1,12 @@ +import type {Glue} from '../utils/Glue'; + + +import {addOutputFieldsSearchResultHit} from './addOutputFieldsSearchResultHit'; + + +export function addObjectTypeSearchResultHit({glue} :{glue :Glue}) { + return glue.addObjectType({ + name: 'SearchResultHit', + fields: addOutputFieldsSearchResultHit({glue}) + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/addOutputFieldsSearchResultHit.ts b/src/main/resources/lib/explorer/interface/graphql/output/addOutputFieldsSearchResultHit.ts new file mode 100644 index 00000000..f71fece1 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/addOutputFieldsSearchResultHit.ts @@ -0,0 +1,26 @@ +import type {Glue} from '../utils/Glue'; + + +import { + Json as GraphQLJson, + GraphQLFloat, + GraphQLString, + nonNull + //@ts-ignore +} from '/lib/graphql'; + + +export function addOutputFieldsSearchResultHit({glue} :{glue :Glue}) { + return glue.addOutputFields({ + name: 'SearchResultHitFields', + fields: { + _collection: { type: nonNull(GraphQLString) }, + _createdTime: { type: GraphQLString }, // TODO nonNull? + _documentType: { type: GraphQLString }, // Nullable + _json: { type: nonNull(GraphQLJson) }, + _highlight: { type: GraphQLJson }, // Nullable + _modifiedTime: { type: GraphQLString }, // Nullable + _score: { type: nonNull(GraphQLFloat) } + } + }); +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/constants.ts b/src/main/resources/lib/explorer/interface/graphql/output/constants.ts new file mode 100644 index 00000000..8dc100b3 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/constants.ts @@ -0,0 +1 @@ +export const GQL_INTERFACE_TYPE_DOCUMENT = 'Document'; diff --git a/src/main/resources/lib/explorer/interface/graphql/output/getInterfaceInfo.ts b/src/main/resources/lib/explorer/interface/graphql/output/getInterfaceInfo.ts new file mode 100644 index 00000000..670a5b28 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/getInterfaceInfo.ts @@ -0,0 +1,91 @@ +import type {CollectionNode} from '/lib/explorer/types/Collection.d'; + + +import { + forceArray//, + //toStr +} from '@enonic/js-utils'; +import {PRINCIPAL_EXPLORER_READ} from '/lib/explorer/constants'; +import {connect} from '/lib/explorer/repo/connect'; +import {getCollectionIds} from '/lib/explorer/collection/getCollectionIds'; +import {get as getInterface} from '/lib/explorer/interface/get'; +import {coerseInterfaceType} from '/lib/explorer/interface/coerseInterfaceType'; + + +export function getInterfaceInfo({ + interfaceName +} :{ + interfaceName :string +}) { + const explorerRepoReadConnection = connect({ principals: [PRINCIPAL_EXPLORER_READ] }); + + const interfaceNode = getInterface({ + connection: explorerRepoReadConnection, + interfaceName + }); + + const filteredInterfaceNode = coerseInterfaceType(interfaceNode); + + const { + fields = [],// = DEFAULT_INTERFACE_FIELDS, TODO This wont work when fields = [] which filter does + stopWords, + synonymIds + } = filteredInterfaceNode; + //log.debug('synonymIds:%s', toStr(synonymIds)); + + let { + collectionIds, + } = filteredInterfaceNode; + + if (interfaceName === 'default' ) { + // The default interface has no collectionIds, so get all collectionIds: + collectionIds = getCollectionIds({ + connection: explorerRepoReadConnection + }); + } + + const collectionIdsWithNames = forceArray( + explorerRepoReadConnection.get(...collectionIds) as CollectionNode + ) + .map(({_id, _name}) => ({_id, _name})); + + //const collectionIdToName :Record = {}; + const collectionNameToId :Record = {}; + for (let i = 0; i < collectionIdsWithNames.length; i++) { + const {_id, _name} = collectionIdsWithNames[i]; + //collectionIdToName[_id] = _name; + collectionNameToId[_name] = _id; + } + + const thesauriNames = synonymIds.length // Avoid: Cannot build empty 'IN' statements" + ? explorerRepoReadConnection.query({ + count: -1, + query: { + boolean: { + must: { + in: { + field: '_id', + values: synonymIds + } + } + } + } + }).hits.map(({id}) => { + const thesauriNode = explorerRepoReadConnection.get(id); + //log.debug('thesauriNode:%s', toStr(thesauriNode)); + if (thesauriNode) { + return thesauriNode._name; + } else { + log.error(`Interface ${interfaceName} refers to an thesarusId ${synonymIds} that doesn't exist!`); + } + }).filter((x) => x) + : []; // Remove missing thesauri. + //log.debug('thesauriNames:%s', toStr(thesauriNames)); + + return { + collectionNameToId, + fields, + stopWords, + thesauriNames + }; +} // getInterfaceInfo diff --git a/src/main/resources/lib/explorer/interface/graphql/output/index.d.ts b/src/main/resources/lib/explorer/interface/graphql/output/index.d.ts new file mode 100644 index 00000000..5cc5cc0b --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/index.d.ts @@ -0,0 +1,65 @@ +import type { + AnyObject, + DocumentNode +} from '/lib/explorer/types/index.d'; +import type {Highlight} from '../highlight/input/index.d'; +//import type {HighlightArray} from '../highlight/output/index.d'; +import type {SynonymsArray} from '/lib/explorer/synonym/index.d'; + + +export type {EmptyObject} from '/lib/explorer/types/index.d'; + + +export type GraphQLContext = { + interfaceName :string +} + +type AggregationsArg = Array // TODO? +type FiltersArg = Array // TODO? + +type SearchCommonArgs = { + aggregations ?:AggregationsArg + filters ?:FiltersArg + highlight ?:Highlight + searchString :string +} + +export type SearchConnectionResolverEnv = { + args :SearchCommonArgs & { + after ?:string + first ?:number + } + context :GraphQLContext +} + +export type SearchResolverEnv = { + args :SearchCommonArgs & { + count ?:number + start ?:number + } + context :GraphQLContext +} + +export type Hit = { + _collection :string + //_collector ?:string // from FIELD_PATH_META + //_collectorVersion ?:string // from FIELD_PATH_META + _createdTime ?:string // from FIELD_PATH_META + _documentType ?:string // from FIELD_PATH_META + _highlight ?:Record> + //_highlight ?:HighlightArray + _json :DocumentNode + _modifiedTime ?:string // from FIELD_PATH_META + //_language ?:string // from FIELD_PATH_META + _score :number + //_stemmingLanguage ?:string // from FIELD_PATH_META +} + +export type SearchResolverReturnType = { + aggregationsAsJson :AnyObject + count :number + hits :Array + start :number + synonyms :SynonymsArray + total :number +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/makeQuery.ts b/src/main/resources/lib/explorer/interface/graphql/output/makeQuery.ts new file mode 100644 index 00000000..f0dff4ab --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/makeQuery.ts @@ -0,0 +1,43 @@ +import type {InterfaceField} from '/lib/explorer/types/index.d'; + + +import { + QUERY_OPERATOR_AND, + storage +} from '@enonic/js-utils'; + + +const bool = storage.query.dsl.bool; +const fulltext = storage.query.dsl.fulltext; +const ngram = storage.query.dsl.ngram; +const or = storage.query.dsl.or; +const stemmed = storage.query.dsl.stemmed; + + +export function makeQuery({ + fields, + searchStringWithoutStopWords +} :{ + fields :Array + searchStringWithoutStopWords :string +}) { + const query = bool(or(fulltext( + fields.map(({boost, name: field}) => ({boost: ( + parseInt(boost as unknown as string) // In case there are some old interface nodes with boost as string rather than number + ||1) + (fields.length * 2), field})), + searchStringWithoutStopWords, + QUERY_OPERATOR_AND + ),stemmed( + fields.map(({boost, name: field}) => ({boost: ( + parseInt(boost as unknown as string) // In case there are some old interface nodes with boost as string rather than number + ||1) + fields.length, field})), + searchStringWithoutStopWords, + QUERY_OPERATOR_AND, + //language // TODO @enonic/js-utils defaults to english, which is why it works + ),ngram( + fields.map(({boost, name: field}) => ({boost, field})), + searchStringWithoutStopWords, + QUERY_OPERATOR_AND + ))); + return query; +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/makeQueryParams.ts b/src/main/resources/lib/explorer/interface/graphql/output/makeQueryParams.ts new file mode 100644 index 00000000..a60aa11f --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/makeQueryParams.ts @@ -0,0 +1,169 @@ +import type { + AnyObject, + InterfaceField +} from '/lib/explorer/types/index.d'; +import type {Highlight} from '../highlight/input/index.d'; + + +import { + addQueryFilter, + forceArray//, + //toStr +} from '@enonic/js-utils'; +import { + NT_DOCUMENT, + PRINCIPAL_EXPLORER_READ +} from '/lib/explorer/constants'; +import {connect} from '/lib/explorer/repo/connect'; +import {hasValue} from '/lib/explorer/query/hasValue'; +import {removeStopWords} from '/lib/explorer/query/removeStopWords'; +import {wash} from '/lib/explorer/query/wash'; +import {get as getStopWordsList} from '/lib/explorer/stopWords/get'; +import {getSynonymsFromSearchString} from '/lib/explorer/synonym/getSynonymsFromSearchString'; +import {flattenSynonyms} from '/lib/explorer/synonym/flattenSynonyms'; +import { + createAggregation, + createFilters + //@ts-ignore +} from '/lib/guillotine/util/factory'; +import {makeQuery} from './makeQuery'; +import { + highlightGQLArgToEnonicXPQuery +} from '../highlight/input/highlightGQLArgToEnonicXPQuery'; +import {resolveFieldShortcuts} from './resolveFieldShortcuts'; + + +export function makeQueryParams({ + aggregationsArg, + count, + fields, + filtersArg, + highlightArg, + searchString = '', + start, + stopWords, + thesauriNames +} :{ + aggregationsArg :Array + count ?:number + fields :Array + filtersArg ?:Array + highlightArg ?:Highlight + searchString :string + start ?:number + stopWords :Array + thesauriNames :Array +}) { + //log.debug('makeQueryParams highlightArg:%s', toStr(highlightArg)); + + const aggregations = {}; + if (aggregationsArg) { + //log.debug('makeQueryParams aggregationsArg:%s', toStr(aggregationsArg)); + forceArray(resolveFieldShortcuts({ + basicObject: aggregationsArg + })).forEach(aggregation => { + // This works magically because fieldType is an Enum. + createAggregation(aggregations, aggregation); + }); + } + + const staticFilter = addQueryFilter({ + filter: hasValue('_nodeType', [NT_DOCUMENT]), + filters: {} + }); + //log.debug('staticFilter:%s', toStr(staticFilter)); + + let filtersArray :Array; + if (filtersArg) { + // This works magically because fieldType is an Enum? + filtersArray = createFilters(resolveFieldShortcuts({ + basicObject: filtersArg + })); + //log.debug('filtersArray:%s', toStr(filtersArray)); + filtersArray.push(staticFilter as unknown as AnyObject); + //log.debug('filtersArray:%s', toStr(filtersArray)); + } + + const explorerRepoReadConnection = connect({ principals: [PRINCIPAL_EXPLORER_READ] }); + + const washedSearchString = wash({string: searchString}); + const listOfStopWords = []; + if (stopWords && stopWords.length) { + //log.debug(`stopWords:${toStr(stopWords)}`); + stopWords.forEach((name) => { + const {words} = getStopWordsList({ // Not a query + connection: explorerRepoReadConnection, + name + }); + //log.debug(`words:${toStr(words)}`); + words.forEach((word) => { + if (!listOfStopWords.includes(word)) { + listOfStopWords.push(word); + } + }); + }); + } + //log.debug(`listOfStopWords:${toStr({listOfStopWords})}`); + const removedStopWords = []; + const searchStringWithoutStopWords = removeStopWords({ + removedStopWords, + stopWords: listOfStopWords, + string: washedSearchString + }); + + const synonyms = getSynonymsFromSearchString({ + //expand, + //explain, + explorerRepoReadConnection, + searchString: searchStringWithoutStopWords, + showSynonyms: true, + thesauri: thesauriNames + }); + //log.debug('synonyms:%s', toStr(synonyms)); + + const flattenedSynonyms = flattenSynonyms({ + //expand, + synonyms + }).map(s => `${s}`); // Removed double quotes https://enonic.zendesk.com/agent/tickets/3714 + //log.debug('flattenedSynonyms:%s', toStr(flattenedSynonyms)); + + //log.debug('fields:%s', toStr(fields)); + const query = makeQuery({ + fields, + searchStringWithoutStopWords + }); + //log.debug('query:%s', toStr(query)); + + if (flattenedSynonyms) { + for (let i = 0; i < flattenedSynonyms.length; i++) { + //log.debug(`flattenedSynonyms[${i}]:%s`, flattenedSynonyms[i]); + //log.debug('before query.boolean.should:%s', toStr(query.boolean.should)); + const aSynonymQuery = { + fulltext: { + fields: fields.map(({name}) => name), // NOTE: No boosting + operator: 'AND', + query: flattenedSynonyms[i] + } + }; + //log.debug('aSynonymQuery:%s', toStr(aSynonymQuery)); + //@ts-ignore // We know it's a list + query.boolean.should.push(aSynonymQuery); + //log.debug('after query.boolean.should:%s', toStr(query.boolean.should)); + } // for flattenedSynonyms + } + //log.debug('query:%s', toStr(query)); + + return { + queryParams: { + aggregations, + count, + filters: filtersArray ? filtersArray : staticFilter, + highlight: highlightArg + ? highlightGQLArgToEnonicXPQuery({highlightArg}) + : null, + query, + start, + }, + synonyms + }; +} diff --git a/src/main/resources/lib/explorer/interface/graphql/output/resolveFieldShortcuts.ts b/src/main/resources/lib/explorer/interface/graphql/output/resolveFieldShortcuts.ts new file mode 100644 index 00000000..45cbb208 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/resolveFieldShortcuts.ts @@ -0,0 +1,31 @@ +import type {AnyObject} from '/lib/explorer/types/index.d'; + + +//import {toStr} from '@enonic/js-utils'; +import traverse from 'traverse'; +import {FIELD_PATH_META} from '/lib/explorer/constants'; + + +export function resolveFieldShortcuts({ + basicObject, + shortcuts = { + _collection: `${FIELD_PATH_META}.collection`, + _createdTime: `${FIELD_PATH_META}.createdTime`, + _documentType: `${FIELD_PATH_META}.documentType`, + _modifiedTime: `${FIELD_PATH_META}.modifiedTime` + } +} :{ + basicObject :Object // eslint-disable-line @typescript-eslint/ban-types + shortcuts ?:Record +}) { + const derefBasicObj :AnyObject = JSON.parse(JSON.stringify(basicObject)); + traverse(derefBasicObj) + .forEach(function(value) { // forEach updates the object in-place + if (shortcuts[value] && this.path[this.path.length - 1] === 'field') { + //log.debug('this.path:%s this.key:%s value:%s ', this.path, this.key, toStr(value)); + this.update(shortcuts[value]); + } + }); // forEach + //log.debug('derefBasicObj:%s ', toStr(derefBasicObj)); + return derefBasicObj; +} // resolveFieldShortcuts diff --git a/src/main/resources/lib/explorer/interface/graphql/output/searchResolver.ts b/src/main/resources/lib/explorer/interface/graphql/output/searchResolver.ts new file mode 100644 index 00000000..3e24a70b --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/output/searchResolver.ts @@ -0,0 +1,138 @@ +import type {DocumentNode} from '/lib/explorer/types/index.d'; +import type { + Hit, + SearchResolverEnv, + SearchResolverReturnType +} from './index.d'; + + +import { + getIn//, + //toStr +} from '@enonic/js-utils'; +import { + COLLECTION_REPO_PREFIX, + FIELD_PATH_META, + PRINCIPAL_EXPLORER_READ +} from '/lib/explorer/constants'; +import {connect} from '/lib/explorer/repo/connect'; +import {multiConnect} from '/lib/explorer/repo/multiConnect'; +import {washDocumentNode} from '../utils/washDocumentNode'; +import {getInterfaceInfo} from './getInterfaceInfo'; +import {makeQueryParams} from './makeQueryParams'; +/*import { + queryResHighlightObjToArray +} from '../highlight/output/queryResHighlightObjToArray';*/ + + +export function searchResolver({ + args: { + aggregations: aggregationsArg, + count, // ?:number + filters: filtersArg, + highlight: highlightArg, + searchString = '', // :string + start = 0 + }, + context: { + interfaceName + } +} :SearchResolverEnv) :SearchResolverReturnType { + //log.debug('searchResolver aggregationsArg:%s', toStr(aggregationsArg)); + //log.debug('searchResolver filtersArg:%s', toStr(filtersArg)); + //log.debug('searchResolver highlightArg:%s', toStr(highlightArg)); + //log.debug('searchResolver interfaceName:%s searchString:%s', interfaceName, searchString); + + const { + collectionNameToId, + fields, + stopWords, + thesauriNames + } = getInterfaceInfo({ + interfaceName + }); + const multiRepoReadConnection = multiConnect({ + principals: [PRINCIPAL_EXPLORER_READ], + sources: Object.keys(collectionNameToId).map((collectionName) => ({ + repoId: `${COLLECTION_REPO_PREFIX}${collectionName}`, + branch: 'master', // NOTE Hardcoded + principals: [PRINCIPAL_EXPLORER_READ] + })) + }); + + const { + queryParams, + synonyms + } = makeQueryParams({ + aggregationsArg, + count, + fields, + filtersArg, + highlightArg, + searchString, + start, + stopWords, + thesauriNames, + }); + //log.debug('searchResolver queryParams:%s', toStr(queryParams)); + + //@ts-ignore filters type supports array too + const queryRes = multiRepoReadConnection.query(queryParams); + //log.debug('searchResolver queryRes:%s', toStr(queryRes)); + //log.debug('searchResolver queryRes.aggregations:%s', toStr(queryRes.aggregations)); + + const rv :SearchResolverReturnType = { + aggregationsAsJson: queryRes.aggregations, // GraphQL automatically converts to JSON + count: queryRes.count, + hits: queryRes.hits.map(({ + branch, + highlight: highlightObj, + id, + repoId, + score + }) => { + const collectionName = repoId.replace(COLLECTION_REPO_PREFIX, ''); + const collectionNode = connect({ + branch, + principals: [PRINCIPAL_EXPLORER_READ], + repoId + }).get(id); + //log.debug('collectionNode:%s', toStr(collectionNode)); + + const washedNode = washDocumentNode(collectionNode); + //log.debug('washedNode:%s', toStr(washedNode)); + + const hit :Hit = { + ...washedNode, // Needed for ... on DocumentType_... + _collection: collectionName, + _createdTime: getIn< + DocumentNode, + //[typeof FIELD_PATH_META, 'createdTime'] // not keyof DocumentNode + keyof DocumentNode, + //DocumentNode[typeof FIELD_PATH_META]['createdTime'], // string|Date + string, + undefined + >(collectionNode, [FIELD_PATH_META, 'createdTime'], undefined), + _documentType: getIn(collectionNode, [FIELD_PATH_META, 'documentType'], undefined), + _highlight: highlightObj, //queryResHighlightObjToArray({highlightObj}), + _json: washedNode, + _modifiedTime: getIn< + DocumentNode, + //[typeof FIELD_PATH_META, 'modifiedTime'] // not keyof DocumentNode + keyof DocumentNode, + //DocumentNode[typeof FIELD_PATH_META]['modifiedTime'], // string|Date + string, + undefined + >(collectionNode, [FIELD_PATH_META, 'modifiedTime'], undefined), + _score: score + } + //log.debug('hit:%s', toStr(hit)); + + return hit; + }), + start, // Used by searchConnection + synonyms, + total: queryRes.total + }; + return rv +} diff --git a/src/main/resources/lib/explorer/interface/graphql/utils/Glue.ts b/src/main/resources/lib/explorer/interface/graphql/utils/Glue.ts new file mode 100644 index 00000000..cdead5c8 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/utils/Glue.ts @@ -0,0 +1,366 @@ +import type {AnyObject} from '/lib/explorer/types/index.d'; +import type {GraphQL} from '../index.d'; +import type { + FieldResolver, + Fields, + GraphQLObjectType, + Interfaces, + TypeResolver, + Types +} from './index.d'; + + +import {hasOwnProperty} from '@enonic/js-utils'; + + +/* + +Goals: + 1. GraphQL type names must be unique + 2. Avoid unused names? + 3. Easy access to all types + +*/ +//────────────────────────────────────────────────────────────────────────────── +// EnumType +//────────────────────────────────────────────────────────────────────────────── +function addEnumType({ + description, + name, + values +} :{ + description ?:string + name :string + values :GraphQL.EnumValues +}) :GraphQL.EnumType { + //log.debug(`addEnumType({ name: ${name} })`); + if(this.uniqueNames[name]) { + throw new Error(`Name ${name} already used as ${this.uniqueNames[name]}!`); + } + this.uniqueNames[name] = 'enumType'; + this.enumTypes[name] = this.schemaGenerator.createEnumType({ + description, + name, + values + }); + return this.enumTypes[name]; +} + + +function getEnumType(name :string) :GraphQL.EnumType { + return this.enumTypes[name]; +} + +//────────────────────────────────────────────────────────────────────────────── +// InputFields +//────────────────────────────────────────────────────────────────────────────── +function addInputFields({ + name, + fields +} : { + name :string + fields :InputFields +}) { + if (this.inputFields[name]) { + throw new Error(`InputFields ${name} already added!`); + } + this.inputFields[name] = fields; + return this.inputFields[name]; +} + +function getInputFields(name :string) { + return this.inputFields[name]; +} + +//────────────────────────────────────────────────────────────────────────────── +// InputType +//────────────────────────────────────────────────────────────────────────────── +function addInputType({ + description, + fields, + name +} :{ + description ?:string + fields :Fields + name :string +}) { + //log.debug(`addInputType({ name: ${name} })`); + if(this.uniqueNames[name]) { + throw new Error(`Name ${name} already used as ${this.uniqueNames[name]}!`); + } + this.uniqueNames[name] = 'inputType'; + this.inputTypes[name] = this.schemaGenerator.createInputObjectType({ + description, + fields, + name + }); + return this.inputTypes[name]; +} + +function getInputType(name :string) { + return this.inputTypes[name]; +} + +//────────────────────────────────────────────────────────────────────────────── +// ObjectType +//────────────────────────────────────────────────────────────────────────────── +function addObjectType({ + description, + fields, + interfaces = [], + name +} : { + description ?:string + fields :Fields + interfaces ?:Interfaces + name :string +}) { + //log.debug('Glue addObjectType({ name: %s })', name); + if(this.objectTypes[name]) { + //log.debug('objectType "%s" already added, returning previous', name); + return this.objectTypes[name].type; + } + if(this.uniqueNames[name]) { + throw new Error(`Name ${name} already used as ${this.uniqueNames[name]}!`); + } + this.uniqueNames[name] = 'objectType'; + this.objectTypes[name] = { + interfaces, + type: this.schemaGenerator.createObjectType({ + description, + fields, + interfaces, + name + }) + }; + return this.objectTypes[name].type; +} + +function getObjectType(name :string) { + return this.objectTypes[name].type; +} + +//────────────────────────────────────────────────────────────────────────────── +// OutputFields +//────────────────────────────────────────────────────────────────────────────── +function addOutputFields({ + name, + fields +} : { + name :string + fields :OutputFields +}) { + if (this.outputFields[name]) { + //throw new Error(`OutputFields ${name} already added!`); + //log.error('OutputFields "%s" already added, returning previous', name) + return this.outputFields[name]; + } + this.outputFields[name] = fields; + return this.outputFields[name]; +} + +function getOutputFields(name :string) { + return this.outputFields[name]; +} + +//────────────────────────────────────────────────────────────────────────────── +// UnionType +//────────────────────────────────────────────────────────────────────────────── +function addUnionType({ + name, + typeResolver, + types +} :{ + name :string + typeResolver :TypeResolver + types :Types +}) { + //log.debug(`addUnionType({ name: ${name} })`); + if(this.uniqueNames[name]) { + throw new Error(`Name ${name} already used as ${this.uniqueNames[name]}!`); + } + this.uniqueNames[name] = 'unionType'; + this.unionTypes[name] = { + type: this.schemaGenerator.createUnionType({ + name, + typeResolver, + types + }), + typeResolver, + types + }; + return this.unionTypes[name].type; +} + +function getUnionType(name :string) { + if (!hasOwnProperty(this.unionTypes, name)) { // true also when property is set to undefined + if (this.uniqueNames[name]) { + throw new Error(`name:${name} is not an unionType! but ${this.uniqueNames[name]}`); + } + throw new Error(`name:${name} not found in unionTypes, perhaps you're trying to use it before it's defined?`); + } + return this.unionTypes[name].type; +} + +/*function getUnionTypeResolver(name) { + return this.unionTypes[name].typeResolver; +}*/ + +//────────────────────────────────────────────────────────────────────────────── +// InterfaceType +//────────────────────────────────────────────────────────────────────────────── +function addInterfaceType({ + description, + fields, + name, + typeResolver +} : { + description ?:string + fields :Fields + name :string + typeResolver :TypeResolver +}) { + if(this.interfaceTypes[name]) { + //log.debug('interfaceType "%s" already added, returning previous', name); + return this.interfaceTypes[name].type; + } + if(this.uniqueNames[name]) { + throw new Error(`Name ${name} already used as ${this.uniqueNames[name]}!`); + } + this.uniqueNames[name] = 'interfaceType'; + this.interfaceTypes[name] = { + fields, + type: this.schemaGenerator.createInterfaceType({ + description, + fields, + name, + typeResolver + })//, + //typeResolver // NOTE This should be fetched from the unionType instead... + }; + return this.interfaceTypes[name].type; +} + +function getInterfaceType(name :string) { + return this.interfaceTypes[name].type; +} + +function getInterfaceTypeFields(name :string) { + return this.interfaceTypes[name].fields; +} + +function getInterfaceTypeObject(name :string) { + return this.interfaceTypes[name]; +} + +//────────────────────────────────────────────────────────────────────────────── +// QueryField +//────────────────────────────────────────────────────────────────────────────── +function addQueryField< + Env extends AnyObject = AnyObject, + ResultGraph extends AnyObject = AnyObject +>({ + args = {}, + name, + resolve,// = () => {}, + type +} : { + args ?:AnyObject + name :string + resolve :FieldResolver + type :GraphQLObjectType +}) { + //log.debug('Glue addQueryField({ name: %s })', name); + if(this.queryFields[name]) { + throw new Error(`Name ${name} already added!`); + } + this.queryFields[name] = { + args, + resolve, + type + }; + return this.queryFields[name]; +} + + +function buildSchema() { + //log.debug('Glue buildSchema'); + /* + GIVEN that an objectType that implements an interface + AND that objectType is NOT directly added/available in the schema + WHEN a query result includes the interfaceType + THEN GraphQL will throw an error that the objectType is not a valid type + + This happens because the interfaceType.typeResolver() returns an objectType + that doesn't exist in the schema. + Simply adding the objectType to the dictionary, solves the problem. + */ + const objectTypesWithInterfaces = []; + const objectTypeNames = Object.keys(this.objectTypes); + //log.debug('objectTypeNames:%s', objectTypeNames); + + for (let i = 0; i < objectTypeNames.length; i++) { + const objectTypeName = objectTypeNames[i]; + if ( + this.objectTypes[objectTypeName].interfaces + && Array.isArray(this.objectTypes[objectTypeName].interfaces) + && this.objectTypes[objectTypeName].interfaces.length + ) { + //log.debug('Glue objectTypeName:%s has interfaces', objectTypeName); + objectTypesWithInterfaces.push(this.objectTypes[objectTypeName].type); + } + } // for objectTypeNames + //log.debug(`Number of objectTypes:${Object.keys(this.objectTypes).length} Number of objectTypes implementing interfaces:${objectTypesWithInterfaces.length}`); + + //log.debug('queryFields:%s', Object.keys(this.queryFields)); + return this.schemaGenerator.createSchema({ + //dictionary: Object.keys(this.objectTypes).map((k) => this.objectTypes[k].type), // No need to add all objectTypes... + dictionary: objectTypesWithInterfaces, + + //mutation:, + query: this.addObjectType({ + name: 'Query', + fields: this.queryFields + })//, + //subscription: + }); +} + + +export function constructGlue({ + schemaGenerator +}) { + return { + addEnumType, // function + addInputFields, // function + addInputType, // function + addInterfaceType, // function + addObjectType, // function + addOutputFields, // function + addQueryField, // function + addUnionType, // function + buildSchema, // function + enumTypes: {}, + getEnumType, // function + getInputFields, // function + getInputType, // function + getInterfaceType, // function + getInterfaceTypeFields, // function + getInterfaceTypeObject, // function + getObjectType, // function + getOutputFields, // function + getUnionType, // function + //getUnionTypeResolver, // function + inputFields: {}, + inputTypes: {}, + interfaceTypes: {}, + objectTypes: {}, + outputFields: {}, + queryFields: {}, + schemaGenerator, + unionTypes: {}, + uniqueNames: {} + }; +} + +export type Glue = ReturnType; diff --git a/src/main/resources/lib/explorer/interface/graphql/utils/documentTypeNameToGraphQLObjectTypeName.ts b/src/main/resources/lib/explorer/interface/graphql/utils/documentTypeNameToGraphQLObjectTypeName.ts new file mode 100644 index 00000000..5076139d --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/utils/documentTypeNameToGraphQLObjectTypeName.ts @@ -0,0 +1,9 @@ +import { + //camelize, + ucFirst +} from '@enonic/js-utils'; + + +export function documentTypeNameToGraphQLObjectTypeName(documentTypeName :string) { + return `DocumentType_${ucFirst(documentTypeName)}`; +} diff --git a/src/main/resources/lib/explorer/interface/graphql/utils/index.d.ts b/src/main/resources/lib/explorer/interface/graphql/utils/index.d.ts new file mode 100644 index 00000000..f17aa96b --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/utils/index.d.ts @@ -0,0 +1,21 @@ +import type {AnyObject} from '/lib/explorer/types'; + + +export type Branch = { + [x :string]: Leaf|Branch +} + +export type Fields = AnyObject; + +export type GraphQLObjectType = unknown; +type GraphQLInterfaceType = unknown; +type GraphQLTypeReference = string; + +export type FieldResolver< + Env extends AnyObject = AnyObject, + ResultGraph extends AnyObject = AnyObject +> = (env :Env) => ResultGraph +export type TypeResolver = (node :Node) => GraphQLObjectType + +export type Interfaces = Array +export type Types = Array diff --git a/src/main/resources/lib/explorer/interface/graphql/utils/mergeFields.ts b/src/main/resources/lib/explorer/interface/graphql/utils/mergeFields.ts new file mode 100644 index 00000000..a1f24e6e --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/utils/mergeFields.ts @@ -0,0 +1,71 @@ +import type {DocumentTypeFields} from '/lib/explorer/types/index.d'; +import type {Branch} from './index.d'; + + +import { + VALUE_TYPE_STRING, + camelize//, + //toStr +} from '@enonic/js-utils'; +import setIn from 'set-value'; // Number.isInteger and Reflect + + +export function mergeFields({ + camelToFieldObj, // modified + globalFieldsObj, // just read + properties // just read +} :{ + camelToFieldObj :Record + globalFieldsObj :Record + properties :DocumentTypeFields +}) :Branch { + const mergedglobalFieldsObj :Branch = JSON.parse(JSON.stringify(globalFieldsObj)); // deref + //log.debug(`documentTypeName:${toStr(documentTypeName)} mergedglobalFieldsObj:${toStr(mergedglobalFieldsObj)}`); + + if (properties) { + properties.forEach(({ + max = 0, + min = 0, + name, + valueType = VALUE_TYPE_STRING + }) => { + const lowercasedName = name.toLowerCase(); // TODO handle on lowerlevels, so it always comes here in lowercase? + + // In GraphQL Name must be non-null, non-empty and match /^[_A-Za-z][_0-9A-Za-z]*$/ + + /* + // In Explorer<2.0.0 a global field could contain a dash, which GraphQL Name can't contain, so this code camelized it away: + const camelizedFieldPath = name // 'nes-ted.na-me' + .split('.') // ['nes-ted', 'na-me'] + .map((k) => camelize(k, /[-]/g)) // ['nesTed', 'naMe'] // This was done for old broken field names, which contained '-' + .join('.'); // 'nesTed.naMe' + */ + + // But the thing is a GraphQL can't contain a dot either, so if we camelize both [.-] there is no way to know which is correct: + // nesTedNaMe -> nes.ted.na.me or nes-ted-na-me ??? + // So let's forget about old BORKEN names with dash in them, and only care about the dot. + + // Because of how Enonic XP indexes fields, our DocumentType fieldPaths are actually /^[a-z][_0-9a-z]*(.[a-z][_0-9a-z]*)*$/ + // Special fields can start with undescore. Those should be strictly controlled by us. For now they are hardcoded. + setIn(mergedglobalFieldsObj, lowercasedName, { + // These are prefixed with underscore to avoid colliding with nested PropertyKeys + _max: max, + _min: min, + _valueType: valueType + }, { merge: true }); + + const camelizedFieldKey = camelize(lowercasedName, /[.]/g); // Used to be [.-] + if (camelToFieldObj[camelizedFieldKey] && camelToFieldObj[camelizedFieldKey] !== lowercasedName) { + // Since we only replace dots now (not dashes), this collision should never happen anymore + throw new Error(`Name collision from camelized:${camelizedFieldKey} to both ${camelToFieldObj[lowercasedName]} and ${name}`); + } + camelToFieldObj[camelizedFieldKey] = name; + }); // properties.forEach + } + //log.debug('mergeFields mergedglobalFieldsObj:%s', toStr(mergedglobalFieldsObj)); + return mergedglobalFieldsObj; +} diff --git a/src/main/resources/lib/explorer/interface/graphql/utils/objToGraphQL.ts b/src/main/resources/lib/explorer/interface/graphql/utils/objToGraphQL.ts new file mode 100644 index 00000000..7ca78478 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/utils/objToGraphQL.ts @@ -0,0 +1,99 @@ +import type {Glue} from './Glue'; +import type { + Branch, + Fields, + GraphQLObjectType +} from './index.d'; + + +import { + VALUE_TYPE_SET, + camelize, + //toStr, + ucFirst +} from '@enonic/js-utils'; +import traverse from 'traverse'; +import { + list, + nonNull + //@ts-ignore +} from '/lib/graphql'; +import {valueTypeToGraphQLType} from './valueTypeToGraphQLType'; + + +export function objToGraphQL({ + documentTypeName, + glue, + obj +} :{ + documentTypeName :string + glue :Glue + obj :Branch +}) :Fields { + //log.debug('objToGraphQL documentTypeName:%s obj:%s', documentTypeName, toStr(obj)); + + const emptyObj = {}; + traverse(obj).forEach(function(value) { // Fat arrow destroys this + //log.debug(`this:${toStr(this)}`); // JSON.stringify got a cyclic data structure + //log.debug(`key:${toStr(this.key)} value:${toStr(value)} isLeaf:${toStr(this.isLeaf)}`); + // NOTE Because of recursion this.level and this.path is flattened! + //log.debug(`this.level:${toStr(this.level)} this.key:${toStr(this.key)} this.path:${toStr(this.path)} this.node:${toStr(this.node)} value:${toStr(value)}`); + if (this.notRoot) { + if (this.notLeaf) { + //log.debug('objToGraphQL value:%s', value); + const { + _max = 0, + _min = 0, + _valueType + } = value; + //log.debug('objToGraphQL documentTypeName:%s this.key:%s (maybe flattened?!) _max:%s _min:%s _valueType:%s', documentTypeName, this.key, _max, _min, _valueType); + + if (_valueType) { + let type :GraphQLObjectType; + if (_valueType === VALUE_TYPE_SET) { + this.block(); // No need to continue walking down this branch, since we recurse it instead + const nestedObjectTypeName = `${documentTypeName}${ucFirst(camelize(this.key, /[.]/g))}`; // Must be unique + type = glue.addObjectType({ + name: nestedObjectTypeName, // Must be unique + fields: objToGraphQL({ + documentTypeName: nestedObjectTypeName, // So nested.name and nested.name.name don't get the same documentTypeName :) + glue, + obj: value + }) // Recurse NOTE This FLATTENES this.path :( + }); + } else { + type = valueTypeToGraphQLType(_valueType); // VALUE_TYPE_SET becomes GraphQLString :( + } + + if (_min > 0) { + type = nonNull(type); // Can be wrapped with list, so it becomes list(nonNull(type)) + } + + // max:0 could be list, definetly is when min>1 + // max:1 is NOT list + if (_max > 1 || _min > 1) { + type = list(type); // list(type) or list(nonNull(type)) + if (_min > 0) { + // When this if was one scope out, I got this error: + // A non null type cannot wrap an existing non null type 'String!' + type = nonNull(type); // nonNull(list(type)) or nonNull(list(nonNull(type))) + } + } + + // _min:0 means no lower limit, aka optional + // _max:0 means no upper limit, aka infinite + // _min:0 is allowed with any size of _max (0 to any) + // _max:0 is allowed with any size of _min (any to infinite) + //if (_min > 1 && _max === 1) { + if (_min !== 0 && _max !== 0 && _min > _max) { + log.error('Min:%s is larger than max:%s! Inconsistency in documentType:%s on key:%s', _min, _max, documentTypeName, this.key); + } + + //log.debug('objToGraphQL documentTypeName:%s setting key:%s', documentTypeName, this.key); + emptyObj[this.key] = {type}; + } // if valueType + } // if !leaf + } // if !root + }); // traverse + return emptyObj; +} // objToGraphQL diff --git a/src/main/resources/lib/explorer/interface/graphql/utils/valueTypeToGraphQLType.ts b/src/main/resources/lib/explorer/interface/graphql/utils/valueTypeToGraphQLType.ts new file mode 100644 index 00000000..daf54ee9 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/utils/valueTypeToGraphQLType.ts @@ -0,0 +1,52 @@ +import { + //VALUE_TYPE_ANY, + VALUE_TYPE_BOOLEAN, + VALUE_TYPE_DOUBLE, + //VALUE_TYPE_GEO_POINT, + VALUE_TYPE_INSTANT, + VALUE_TYPE_LOCAL_DATE, + VALUE_TYPE_LOCAL_DATE_TIME, + VALUE_TYPE_LOCAL_TIME, + VALUE_TYPE_LONG, + VALUE_TYPE_REFERENCE, + //VALUE_TYPE_SET, + VALUE_TYPE_STRING +} from '@enonic/js-utils'; +import { + Date as GraphQLDate, + DateTime as GraphQLDateTime, + GraphQLBoolean, + GraphQLFloat, + GraphQLID, + GraphQLInt, + Json as GraphQLJson, + GraphQLString, + LocalDateTime as GraphQLLocalDateTime, + LocalTime as GraphQLLocalTime + //@ts-ignore +} from '/lib/graphql'; + +import {VALUE_TYPE_JSON} from '../constants'; + + +export function valueTypeToGraphQLType(valueType) { + if(valueType === VALUE_TYPE_STRING) return GraphQLString; // Most values are strings + if(valueType === VALUE_TYPE_LONG) return GraphQLInt; // Some are integers + if(valueType === VALUE_TYPE_BOOLEAN) return GraphQLBoolean; // A few are boolean + if(valueType === VALUE_TYPE_DOUBLE) return GraphQLFloat; // A few are floating point numbers + if(valueType === VALUE_TYPE_INSTANT) return GraphQLDateTime; + if(valueType === VALUE_TYPE_LOCAL_DATE) return GraphQLDate; + if(valueType === VALUE_TYPE_LOCAL_DATE_TIME) return GraphQLLocalDateTime; + if(valueType === VALUE_TYPE_LOCAL_TIME) return GraphQLLocalTime; + if(valueType === VALUE_TYPE_JSON) return GraphQLJson; // Only _json thus far + if(valueType === VALUE_TYPE_REFERENCE) return GraphQLID; + return GraphQLString; // The rest are string + /*if(valueType === VALUE_TYPE_GEO_POINT) return GraphQLString; // TODO https://github.com/enonic/lib-graphql/issues/95 + //if(valueType === VALUE_TYPE_ANY) return GraphQLString; + //if(valueType === VALUE_TYPE_SET) return GraphQLString; + + // TODO Remove in lib-explorer-4.0.0/app-explorer-2.0.0 ? + if(valueType === 'uri') return GraphQLString; + if(valueType === 'tag') return GraphQLString; + if(valueType === 'html') return GraphQLString;*/ +} diff --git a/src/main/resources/lib/explorer/interface/graphql/utils/washDocumentNode.ts b/src/main/resources/lib/explorer/interface/graphql/utils/washDocumentNode.ts new file mode 100644 index 00000000..dde49f81 --- /dev/null +++ b/src/main/resources/lib/explorer/interface/graphql/utils/washDocumentNode.ts @@ -0,0 +1,12 @@ +import type {DocumentNode} from '/lib/explorer/types/index.d'; + + +export function washDocumentNode(node :DocumentNode) { + const deref = JSON.parse(JSON.stringify(node)); + Object.keys(deref).forEach((k) => { + if (k.startsWith('_') || k.startsWith('document_metadata')) { + delete deref[k as keyof DocumentNode]; + } + }); + return deref; +} diff --git a/src/main/resources/lib/explorer/types/Synonym.d.ts b/src/main/resources/lib/explorer/types/Synonym.d.ts index 4932e7b4..768569fd 100644 --- a/src/main/resources/lib/explorer/types/Synonym.d.ts +++ b/src/main/resources/lib/explorer/types/Synonym.d.ts @@ -89,7 +89,6 @@ type Synonym_Specific = Synonym_Common & { thesaurusReference :string } -export type SynonymGUIState = Synonym_Common export type Synonym = ExplorerAdminGQLInterfaceNodeCommonProps @@ -98,6 +97,32 @@ export type QueriedSynonym = Synonym & { _score :number } +//────────────────────────────────────────────────────────────────────────── +// Synonym (GUI) +//────────────────────────────────────────────────────────────────────────── +export type SynonymUse = 'both'|'from'|'to' + +export type SynonymGUI_LanguagesSynonymObject = Synonym_LanguagesSynonymObject & { + use :SynonymUse +} + +export type SynonymGUI_Language = { + // Required + comment :string + disabledInInterfaces :Array + enabled :boolean + locale :string + synonyms :Array +} + +export type SynonymGUI = { + // Required + comment :string + enabled :boolean + disabledInInterfaces :Array + languages :Array +} + /* //@ts-ignore Initializers are not allowed in ambient contexts. const EXAMPLE_SYNONYM_NODE :SynonymNode = { diff --git a/webpack.config.babel.js b/webpack.config.babel.js index ad15152b..81b01453 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -30,6 +30,8 @@ const SS_ALIAS = { const SS_EXTERNALS = [ '/lib/cache', '/lib/graphql', + '/lib/graphql-connection', + /^\/lib\/guillotine/, '/lib/http-client', '/lib/license', '/lib/router', diff --git a/yarn.lock b/yarn.lock index 02f05604..b642730e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,20 +23,20 @@ integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== "@babel/core@^7": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.9.tgz#805461f967c77ff46c74ca0460ccf4fe933ddd59" - integrity sha512-1LIb1eL8APMy91/IMW+31ckrfBM4yCoLaVzoDhZUKSM4cu1L1nIidyxkCgzPAgrC5WEz36IPEr/eSeSF9pIn+g== + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.10.tgz#39ad504991d77f1f3da91be0b8b949a5bc466fb8" + integrity sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.9" + "@babel/generator" "^7.18.10" "@babel/helper-compilation-targets" "^7.18.9" "@babel/helper-module-transforms" "^7.18.9" "@babel/helpers" "^7.18.9" - "@babel/parser" "^7.18.9" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.9" - "@babel/types" "^7.18.9" + "@babel/parser" "^7.18.10" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.18.10" + "@babel/types" "^7.18.10" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -52,12 +52,12 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.0" -"@babel/generator@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.9.tgz#68337e9ea8044d6ddc690fb29acae39359cca0a5" - integrity sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug== +"@babel/generator@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.10.tgz#794f328bfabdcbaf0ebf9bf91b5b57b61fa77a2a" + integrity sha512-0+sW7e3HjQbiHbj1NeU/vN8ornohYlacAfZIaXhdoGweQqgcNy69COVciYYqEXJ/v+9OBA7Frxm4CVAuNqKeNA== dependencies: - "@babel/types" "^7.18.9" + "@babel/types" "^7.18.10" "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" @@ -86,7 +86,7 @@ browserslist "^4.20.2" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.18.6": +"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.9.tgz#d802ee16a64a9e824fcbf0a2ffc92f19d58550ce" integrity sha512-WvypNAYaVh23QcjpMR24CwZY2Nz6hqdOcFdPbNpV56hL5H6KiFheO7Xm1aPdlLQ7d5emYZX7VZwPp9x3z+2opw== @@ -115,7 +115,7 @@ "@babel/helper-function-name" "^7.18.6" "@babel/types" "^7.18.6" -"@babel/helper-define-polyfill-provider@^0.3.1", "@babel/helper-define-polyfill-provider@^0.3.2": +"@babel/helper-define-polyfill-provider@^0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.2.tgz#bd10d0aca18e8ce012755395b05a79f45eca5073" integrity sha512-r9QJJ+uDWrd+94BSPcP6/de67ygLtvVy6cK4luE6MOuDsZIdoaPBnfSpbO/+LTifjPckbKXRuI9BB/Z2/y3iTg== @@ -127,7 +127,7 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-environment-visitor@^7.18.6", "@babel/helper-environment-visitor@^7.18.9": +"@babel/helper-environment-visitor@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== @@ -194,7 +194,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== -"@babel/helper-remap-async-to-generator@^7.18.6": +"@babel/helper-remap-async-to-generator@^7.18.6", "@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== @@ -236,6 +236,11 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-string-parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" + integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== + "@babel/helper-validator-identifier@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" @@ -247,14 +252,14 @@ integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== "@babel/helper-wrap-function@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.9.tgz#ae1feddc6ebbaa2fd79346b77821c3bd73a39646" - integrity sha512-cG2ru3TRAL6a60tfQflpEfs4ldiPwF6YW3zfJiRgmoFVIaC1vGnBBgatfec+ZUziPHkHSaXAuEck3Cdkf3eRpQ== + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.10.tgz#a7fcd3ab9b1be4c9b52cf7d7fdc1e88c2ce93396" + integrity sha512-95NLBP59VWdfK2lyLKe6eTMq9xg+yWKzxzxbJ1wcYNi1Auz200+83fMDADjRxBvc2QQor5zja2yTQzXGhk2GtQ== dependencies: "@babel/helper-function-name" "^7.18.9" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.9" - "@babel/types" "^7.18.9" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.18.10" + "@babel/types" "^7.18.10" "@babel/helpers@^7.18.9": version "7.18.9" @@ -274,10 +279,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.18.6", "@babel/parser@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539" - integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg== +"@babel/parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.10.tgz#94b5f8522356e69e8277276adf67ed280c90ecc1" + integrity sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -295,14 +300,14 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" "@babel/plugin-proposal-optional-chaining" "^7.18.9" -"@babel/plugin-proposal-async-generator-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz#aedac81e6fc12bb643374656dd5f2605bf743d17" - integrity sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w== +"@babel/plugin-proposal-async-generator-functions@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.10.tgz#85ea478c98b0095c3e4102bff3b67d306ed24952" + integrity sha512-1mFuY2TOsR1hxbjCo4QL+qlIjV07p4H4EUYw2J/WCqsvFV6V9X9z9YhXbWndc/4fw+hYGlDT7egYxliMp5O6Ew== dependencies: - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-remap-async-to-generator" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-proposal-class-properties@^7", "@babel/plugin-proposal-class-properties@^7.18.6": @@ -331,9 +336,9 @@ "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-proposal-export-default-from@^7": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.18.9.tgz#9dfad26452e53cae8f045c6153e82dc50e9bee89" - integrity sha512-1qtsLNCDm5awHLIt+2qAFDi31XC94r4QepMQcOosC7FpY6O+Bgay5f2IyAQt2wvm1TARumpFprnQt5pTIJ9nUg== + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.18.10.tgz#091f4794dbce4027c03cf4ebc64d3fb96b75c206" + integrity sha512-5H2N3R2aQFxkV4PIBUR/i7PUSwgTZjouJKzI8eKswfIjT0PhvzkPn0t0wIS5zn6maQuvtT0t1oHtMUz61LOuow== dependencies: "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-syntax-export-default-from" "^7.18.6" @@ -782,15 +787,15 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-runtime@^7": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.9.tgz#d9e4b1b25719307bfafbf43065ed7fb3a83adb8f" - integrity sha512-wS8uJwBt7/b/mzE13ktsJdmS4JP/j7PQSaADtnb4I2wL0zK51MQ0pmF8/Jy0wUIS96fr+fXT6S/ifiPXnvrlSg== + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.10.tgz#37d14d1fa810a368fd635d4d1476c0154144a96f" + integrity sha512-q5mMeYAdfEbpBAgzl7tBre/la3LeCxmDO1+wMXRdPWbcoMjR3GiXlCLk7JBZVVye0bqTGNMbt0yYVXX1B1jEWQ== dependencies: "@babel/helper-module-imports" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.9" - babel-plugin-polyfill-corejs2 "^0.3.1" - babel-plugin-polyfill-corejs3 "^0.5.2" - babel-plugin-polyfill-regenerator "^0.3.1" + babel-plugin-polyfill-corejs2 "^0.3.2" + babel-plugin-polyfill-corejs3 "^0.5.3" + babel-plugin-polyfill-regenerator "^0.4.0" semver "^6.3.0" "@babel/plugin-transform-shorthand-properties@^7", "@babel/plugin-transform-shorthand-properties@^7.18.6": @@ -830,20 +835,20 @@ "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-typescript@^7.18.6": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.8.tgz#303feb7a920e650f2213ef37b36bbf327e6fa5a0" - integrity sha512-p2xM8HI83UObjsZGofMV/EdYjamsDm6MoN3hXPYIT0+gxIoopE+B7rPYKAxfrz9K9PK7JafTTjqYC6qipLExYA== + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.10.tgz#b23401b32f1f079396bcaed01667a54ebe4f9f85" + integrity sha512-j2HQCJuMbi88QftIb5zlRu3c7PU+sXNnscqsrjqegoGiCgXR569pEdben9vly5QHKL2ilYkfnSwu64zsZo/VYQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-create-class-features-plugin" "^7.18.9" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-syntax-typescript" "^7.18.6" -"@babel/plugin-transform-unicode-escapes@^7", "@babel/plugin-transform-unicode-escapes@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz#0d01fb7fb2243ae1c033f65f6e3b4be78db75f27" - integrity sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw== +"@babel/plugin-transform-unicode-escapes@^7", "@babel/plugin-transform-unicode-escapes@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz#1ecfb0eda83d09bbcb77c09970c2dd55832aa246" + integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-unicode-regex@^7", "@babel/plugin-transform-unicode-regex@^7.18.6": version "7.18.6" @@ -854,9 +859,9 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/preset-env@^7": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.9.tgz#9b3425140d724fbe590322017466580844c7eaff" - integrity sha512-75pt/q95cMIHWssYtyfjVlvI+QEZQThQbKvR9xH+F/Agtw/s4Wfc2V9Bwd/P39VtixB7oWxGdH4GteTTwYJWMg== + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.10.tgz#83b8dfe70d7eea1aae5a10635ab0a5fe60dfc0f4" + integrity sha512-wVxs1yjFdW3Z/XkNfXKoblxoHgbtUF7/l3PvvP4m02Qz9TZ6uZGxRVYjSQeR87oQmHco9zWitW5J82DJ7sCjvA== dependencies: "@babel/compat-data" "^7.18.8" "@babel/helper-compilation-targets" "^7.18.9" @@ -864,7 +869,7 @@ "@babel/helper-validator-option" "^7.18.6" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-async-generator-functions" "^7.18.6" + "@babel/plugin-proposal-async-generator-functions" "^7.18.10" "@babel/plugin-proposal-class-properties" "^7.18.6" "@babel/plugin-proposal-class-static-block" "^7.18.6" "@babel/plugin-proposal-dynamic-import" "^7.18.6" @@ -924,13 +929,13 @@ "@babel/plugin-transform-sticky-regex" "^7.18.6" "@babel/plugin-transform-template-literals" "^7.18.9" "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.18.6" + "@babel/plugin-transform-unicode-escapes" "^7.18.10" "@babel/plugin-transform-unicode-regex" "^7.18.6" "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.18.9" - babel-plugin-polyfill-corejs2 "^0.3.1" - babel-plugin-polyfill-corejs3 "^0.5.2" - babel-plugin-polyfill-regenerator "^0.3.1" + "@babel/types" "^7.18.10" + babel-plugin-polyfill-corejs2 "^0.3.2" + babel-plugin-polyfill-corejs3 "^0.5.3" + babel-plugin-polyfill-regenerator "^0.4.0" core-js-compat "^3.22.1" semver "^6.3.0" @@ -980,36 +985,37 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" - integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== +"@babel/template@^7.18.10", "@babel/template@^7.18.6": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" + integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/parser" "^7.18.10" + "@babel/types" "^7.18.10" -"@babel/traverse@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.9.tgz#deeff3e8f1bad9786874cb2feda7a2d77a904f98" - integrity sha512-LcPAnujXGwBgv3/WHv01pHtb2tihcyW1XuL9wd7jqh1Z8AQkTd+QVjMrMijrln0T7ED3UXLIy36P9Ao7W75rYg== +"@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.10.tgz#37ad97d1cb00efa869b91dd5d1950f8a6cf0cb08" + integrity sha512-J7ycxg0/K9XCtLyHf0cz2DqDihonJeIo+z+HEdRe9YuT8TY4A66i+Ab2/xZCEW7Ro60bPCBBfqqboHSamoV3+g== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.9" + "@babel/generator" "^7.18.10" "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-function-name" "^7.18.9" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.9" - "@babel/types" "^7.18.9" + "@babel/parser" "^7.18.10" + "@babel/types" "^7.18.10" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.4.4": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.9.tgz#7148d64ba133d8d73a41b3172ac4b83a1452205f" - integrity sha512-WwMLAg2MvJmt/rKEVQBBhIVffMmnilX4oe0sRe7iPOHIGsqpruFHHdrfj4O1CMMtgMtCU4oPafZjDPCRgO57Wg== +"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.4.4": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6" + integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ== dependencies: + "@babel/helper-string-parser" "^7.18.10" "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" @@ -1030,7 +1036,12 @@ resolved "https://registry.yarnpkg.com/@enonic/fnv-plus/-/fnv-plus-1.3.0.tgz#be65a7b128a3b544f60aea3ef978d938e85869f3" integrity sha512-BCN9uNWH8AmiP7BXBJqEinUY9KXalmRzo+L0cB/mQsmFfzODxwQrbvxCHXUNH2iP+qKkWYtB4vyy8N62PViMFw== -"@enonic/js-utils@^0", "@enonic/js-utils@^0.38.0", "@enonic/js-utils@^0.38.8": +"@enonic/js-utils@^0": + version "0.39.0" + resolved "https://registry.yarnpkg.com/@enonic/js-utils/-/js-utils-0.39.0.tgz#e13fd13302b1c4df5c47f29b98e7988e3502d9e5" + integrity sha512-X+No5tauGxOyzwMlHpybtU6CPZPfb3v8TbsdINpV+al+hWwpXCcIHED3BNDCr26gB18b778hfCAwAwroH5dmPw== + +"@enonic/js-utils@^0.38.0", "@enonic/js-utils@^0.38.8": version "0.38.10" resolved "https://registry.yarnpkg.com/@enonic/js-utils/-/js-utils-0.38.10.tgz#a1f202fa1531bde5f0703ed439f7b4e5481ca02e" integrity sha512-hFsLx3saeRRdYbazW+LHexy5ItnIokaQeiqiEpy/WTftk/R7YBUuALGr9fA3qFxn2VkYImM7kpo9GIqIxCwUOg== @@ -1092,15 +1103,20 @@ "@babel/runtime" "^7.10.4" react-is "^16.6.3" -"@humanwhocodes/config-array@^0.9.2": - version "0.9.5" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" - integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== +"@humanwhocodes/config-array@^0.10.4": + version "0.10.4" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" + integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" minimatch "^3.0.4" +"@humanwhocodes/gitignore-to-minimatch@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" + integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== + "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" @@ -1266,9 +1282,9 @@ prop-types "^15.6.2" "@sinclair/typebox@^0.24.1": - version "0.24.21" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.21.tgz#f2e435ac4c1919ae89c2b693a0d4213d09899290" - integrity sha512-II2SIjvxBVJmrGkkZYza/BqNjwx3PWROIA8CZ0/Hn7LV0Mv0CVpZxoyHGBVsQqfFLMv9DmArIeRHTwo76bE6oA== + version "0.24.26" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.26.tgz#84f9e8c1d93154e734a7947609a1dc7c7a81cc22" + integrity sha512-1ZVIyyS1NXDRVT8GjWD5jULjhDyM3IsIHef2VGUMdnWOlX2tkPjyEX/7K0TGSH2S8EaPhp1ylFdjSjUGQ+gecg== "@swc/cli@^0", "@swc/cli@^0.1.26": version "0.1.57" @@ -1280,89 +1296,111 @@ slash "3.0.0" source-map "^0.7.3" -"@swc/core-android-arm-eabi@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.220.tgz#64d60daf569eacf060cb18b6d951d481bb1b2c2d" - integrity sha512-WjjQi9nEZNYeRcLbPBRSnP8PH+UlAxbEJ1SPOGSeBXhjxVYVoBfW98RdqeTBr5BRQ+6FSSD4PPvLPIp5jDn7WQ== - -"@swc/core-android-arm64@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-android-arm64/-/core-android-arm64-1.2.220.tgz#5de82a6cdc454473e141047cfc8bfec1b96def6a" - integrity sha512-Gg/rPvNpk0pBLt7gUAvZKugLdgmiMOkna38E5T3Tbzwgc8Lt8i5qT0AbwQuUOATnPCx8ahL+p27BVfvABeNnWA== - -"@swc/core-darwin-arm64@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.220.tgz#97031b9e72e7acc965065aeaf16d75e396e63435" - integrity sha512-C4GthYOHVuSXOGwjgkuKJqVsJHbMNLVXhfplNoNDcBYF7irBH/nYEHwYG/x2B1sqmJwCdW0e1Ss87MfRGcPVWw== - -"@swc/core-darwin-x64@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.2.220.tgz#276fba063616048829fe8b85c057cdd97664a2a8" - integrity sha512-oFVg9al5gnu9PxGMUAJHhWPvYNWY6YCCCYLGkq8ItY2PV9l00Uw8sHWov0JF1v+pHzXQknjXdpNAzOPTUaJldw== - -"@swc/core-freebsd-x64@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.220.tgz#9e999fd574b8bc439f64fa3b6d5bb1539ed394b9" - integrity sha512-JiOm7sM7sMa5c1Y8CW/yFv8VtzHN0ufFvIL6PW6YAFcNOsIOr0bd02JYKvLWMqM/8W+/XqNuevrbjiDWDpgb0Q== - -"@swc/core-linux-arm-gnueabihf@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.220.tgz#92f304d4894f0de3ba8c2b0e422782174cae8d9c" - integrity sha512-Jew+uez12YXzN3XiMGWHOPeBGY1xIrJtedmqBc0EaCkop1HrF8s7tCh8FY0RRYq6pCvmtbUBZ4vfAr0W9SS3QA== - -"@swc/core-linux-arm64-gnu@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.220.tgz#99625b0ead5d148614c37471cd09e79676ad2a96" - integrity sha512-/U4PMYXJeHOHowVm5QbqGjYOMnA66jGjGv5s3pczyzqEPHDyVV3x2YLJvSePlUKJzNK4aHybKB59wuGmwO4wfg== - -"@swc/core-linux-arm64-musl@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.220.tgz#14040fad59085fec6592b2f0d922a40c3bc77421" - integrity sha512-pbcN61oPrsmJyS3N+i921Z4KYlUSJEmMESTFkTtNjF0NWVF1ZqZC0+4Qx64QrOpE2V1p6HKWWtcllekiCdzpug== - -"@swc/core-linux-x64-gnu@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.220.tgz#e5ec498bb2c5130b3bf9022e260d6582c7229589" - integrity sha512-kBFsLrJFFw7zQkDcuXLBJ0wqbcRj6bY5yyjRiPWsK6rEXgwy+U9g6qvsdwbrHLoIKcbVzT7q0sum/ncSuQ3wfA== - -"@swc/core-linux-x64-musl@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.220.tgz#9df72c82dee57258f635e0090279e2b54c58895e" - integrity sha512-mLWQkvXbamUvQVh3StrAhI6b7JC8TiBbIEICnKERRxXsk/DSpJgaEuRYBNMSNLp/qayAMD4iRyW/2iq+RpSEDw== - -"@swc/core-win32-arm64-msvc@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.220.tgz#70ef47992c66b1a5328f80007669076bdfc5e4a8" - integrity sha512-kF9q7uSTp30krYJTap0V4MTjh4sgA2Fc2Pj9HoiEevwFW4LRux/R4oMMTIv22KUkHWG2GFCeYgJr5c/YUeZEmg== - -"@swc/core-win32-ia32-msvc@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.220.tgz#201e8d7f7826fd3fa52dbedb9a8e5cbffa6cc273" - integrity sha512-/A0xWnwVl3PfjE/VwmGNjdUTCevqMmrut3z+KPRpyqhyhCnUDjXkOE9FnnCbAaY6LIq49f2HdJKL7Vg67Uo1Dw== - -"@swc/core-win32-x64-msvc@1.2.220": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.220.tgz#441932e08922883320b6ffa8a921ad43a5edc337" - integrity sha512-f6bPnF7oACfnNT+ggZUcvvyWdAe5F+hW11o5kY74WMlnzICLP/BzumyQoXrzkDg+4WF83Rj0ckywXhtd8yT32A== +"@swc/core-android-arm-eabi@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.222.tgz#9f7b6c17ca8cd5b6d4e2ddbb26bff8cc84f9887c" + integrity sha512-20/gPOmvdtmHFm4lZnJ0ZxVf1xth+CISsf6sgk0oYVXkHnylCfWkB2CTwm0ZNd1W2anOYED9on5wPK1aCO6Q7Q== + dependencies: + "@swc/wasm" "1.2.122" + +"@swc/core-android-arm64@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-android-arm64/-/core-android-arm64-1.2.222.tgz#fd7f7262fb33e39c5a1169c2067296a6b9e9c39b" + integrity sha512-/0u2Hlf5u2wclfMNI5J610hWoEY897cl7Poqoym7wuihod9oudG1wF+CEXJBXmGI18KLvlYM2tuBmGqHBjguTA== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-darwin-arm64@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.222.tgz#be65a29234a8ee1018195af273586235d69b69d6" + integrity sha512-mGy8BzBvw47mm9+DmQZ7RmVuu7cPO8W1ivcJEdXEGibRwSCyrV5FbyqxX5XFtN+ZyA/H8hOm+SLQJoiF90klYg== + +"@swc/core-darwin-x64@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.2.222.tgz#ba5c9fc53d90d4a43b6d8c59e9fd7a66ad694775" + integrity sha512-5NMf5jfnecFgKGos98pOEaHoLwd7hzKqzXPJFlGSVYzj/EodQ4Qu+ihqc8rEIdCy7DqJugjS2DUUoP+5UDhZjw== + +"@swc/core-freebsd-x64@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.222.tgz#e79d85c8cf9680185ebf9ae90f47a5e762c68d19" + integrity sha512-TuQPUfRdH1gtMBGNKRGef/mpDuVqhAfhWpxjgUVNmjqGkDFZhNgqvDdFKlgkFURlMo+UlUiOcgJ0S0oTNr037Q== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-linux-arm-gnueabihf@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.222.tgz#94303c1e4aae26820b963b1d75b491dcf5538c36" + integrity sha512-qPlCMXJzHdwzoXNhfhXmNMF4dDezJiJEjfJdKHv5+Fqe8nT0kakg7OD0/oo/S0gMP+Fp18YX+C78Z1bT19W07w== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-linux-arm64-gnu@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.222.tgz#0264db737f1b5bd41cb024b1c9ca5169519e4e10" + integrity sha512-eu5TYPZItU/nK+OXQ+EQcQqvM3/HxOyuu7pJL9bIn3ZtVBkOlR372xP8g5nzOl499PX9Zk+GCJTiof9DyTlMjg== + +"@swc/core-linux-arm64-musl@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.222.tgz#08d753bd9896ca94d52084e6158e385e0988dc96" + integrity sha512-FkJOIHiivayFeJ9YspHNLXlJDq5i1ZGZqGJSmMKqIHzYSSatsKaopriRC+gYQ/hQ2hJY6woaivC7qqZissSjbQ== + +"@swc/core-linux-x64-gnu@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.222.tgz#497b4ff80213aa0e93006c6fa04f0d0f020ff763" + integrity sha512-lSKcEntOSV79zgHBPxgslKGkS/br3Ou54h1a5Sb8RpzcHp+uCM9EYwT7gbXQObCJ3KJR3dxeTdsiAzX+I/wzZw== + +"@swc/core-linux-x64-musl@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.222.tgz#0c357efdca60fd51960ebb106ac4dcd78d9ffb0f" + integrity sha512-lWVUgRx1tcNjfT2vu6PZ12/J/8Y0Idyp8OUwaYzPvHjXbf9ThGmsaBzN694z9FVKyMECC1f0r/7PGqXPr/AS2Q== + +"@swc/core-win32-arm64-msvc@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.222.tgz#efe6f27f14cddcf82872248cdc96d69dc894e006" + integrity sha512-Log6DezU2Nld290oI7rt8dTMYz1LfaMOeeDswkzabSPtC/XHV85fMzAsLmOWNIO8YpxHtIEmXEXuKEZLhfZ8/A== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-win32-ia32-msvc@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.222.tgz#5e253562e832c8c52534ff286ec5e20b6ceea165" + integrity sha512-ImQ0AvLX8TwyNTdK7vjHLb9GIvoV6mgDqSfOgGFSZKLpzqqfkZbM/wHRbJynI/ixVx8g358lbuGL6lY7C7wZ6A== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-win32-x64-msvc@1.2.222": + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.222.tgz#1ce32d1aa3fa2bf72f66375066cb906bea358ee2" + integrity sha512-ZkvsMeak1xZdh6TCFemPncIJ2HZ0alpl1qm20Z119Gnp0IP3NURs9JbzvKBT47B7c+PV2hFZr+inJuppnC14jA== "@swc/core@^1", "@swc/core@^1.2.12": - version "1.2.220" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.2.220.tgz#3cc28c8cc56900c5458fbf914f31bc89ad761555" - integrity sha512-a0FNVqfpe1qaRuH05uZYJKv6OGTtsJlpxttpKOGJ7OnFtZZlhNx4riL9Q+bvhuv9JGS9vp8SwEIrTpR7rxPuUg== + version "1.2.222" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.2.222.tgz#69ba62daf2f1fe7e2aa04153d67823338f0c99de" + integrity sha512-lB/R5F0Jd/vP4LA6UEIcaWFFP1URW6ufRfXceZI5jB0m6xHnIp+uGr3pOFSzxQIGKJ/XJ6aWY4uhsxrZxYoCwA== optionalDependencies: - "@swc/core-android-arm-eabi" "1.2.220" - "@swc/core-android-arm64" "1.2.220" - "@swc/core-darwin-arm64" "1.2.220" - "@swc/core-darwin-x64" "1.2.220" - "@swc/core-freebsd-x64" "1.2.220" - "@swc/core-linux-arm-gnueabihf" "1.2.220" - "@swc/core-linux-arm64-gnu" "1.2.220" - "@swc/core-linux-arm64-musl" "1.2.220" - "@swc/core-linux-x64-gnu" "1.2.220" - "@swc/core-linux-x64-musl" "1.2.220" - "@swc/core-win32-arm64-msvc" "1.2.220" - "@swc/core-win32-ia32-msvc" "1.2.220" - "@swc/core-win32-x64-msvc" "1.2.220" + "@swc/core-android-arm-eabi" "1.2.222" + "@swc/core-android-arm64" "1.2.222" + "@swc/core-darwin-arm64" "1.2.222" + "@swc/core-darwin-x64" "1.2.222" + "@swc/core-freebsd-x64" "1.2.222" + "@swc/core-linux-arm-gnueabihf" "1.2.222" + "@swc/core-linux-arm64-gnu" "1.2.222" + "@swc/core-linux-arm64-musl" "1.2.222" + "@swc/core-linux-x64-gnu" "1.2.222" + "@swc/core-linux-x64-musl" "1.2.222" + "@swc/core-win32-arm64-msvc" "1.2.222" + "@swc/core-win32-ia32-msvc" "1.2.222" + "@swc/core-win32-x64-msvc" "1.2.222" + +"@swc/wasm@1.2.122": + version "1.2.122" + resolved "https://registry.yarnpkg.com/@swc/wasm/-/wasm-1.2.122.tgz#87a5e654b26a71b2e84b801f41e45f823b856639" + integrity sha512-sM1VCWQxmNhFtdxME+8UXNyPNhxNu7zdb6ikWpz0YKAQQFRGT5ThZgJrubEpah335SUToNg8pkdDF7ibVCjxbQ== + +"@swc/wasm@1.2.130": + version "1.2.130" + resolved "https://registry.yarnpkg.com/@swc/wasm/-/wasm-1.2.130.tgz#88ac26433335d1f957162a9a92f1450b73c176a0" + integrity sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q== "@tsconfig/node10@^1.0.7": version "1.0.9" @@ -1494,10 +1532,10 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/mime@^1": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" - integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== +"@types/mime@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.0.tgz#e9a9903894405c6a6551f1774df4e64d9804d69c" + integrity sha512-fccbsHKqFDXClBZTDLA43zl0+TbxyIwyzIzwwhvoJvhNjOErCdeX2xJbURimv2EbSVUGav001PaCJg4mZxMl4w== "@types/mocha@^9": version "9.1.1" @@ -1505,9 +1543,9 @@ integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== "@types/node@*", "@types/node@^18": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" - integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/prop-types@*": version "15.7.5" @@ -1558,13 +1596,18 @@ "@types/express" "*" "@types/serve-static@*", "@types/serve-static@^1.13.10": - version "1.13.10" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.10.tgz#f5e0ce8797d2d7cc5ebeda48a52c96c4fa47a8d9" - integrity sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ== + version "1.15.0" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.0.tgz#c7930ff61afb334e121a9da780aac0d9b8f34155" + integrity sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg== dependencies: - "@types/mime" "^1" + "@types/mime" "*" "@types/node" "*" +"@types/set-value@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/set-value/-/set-value-4.0.1.tgz#7caf185556a67c2d9051080931853047423c93bd" + integrity sha512-mP/CLy6pdrhsDVrz1+Yp5Ly6Tcel2IAEejhyI5NxY6WnBUdWN+AAfGa0HHsdgCdsPWWcd/4D5J2X2TrRYcYRag== + "@types/sockjs@^0.3.33": version "0.3.33" resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.33.tgz#570d3a0b99ac995360e3136fd6045113b1bd236f" @@ -1585,13 +1628,13 @@ "@types/node" "*" "@typescript-eslint/eslint-plugin@^5": - version "5.31.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.31.0.tgz#cae1967b1e569e6171bbc6bec2afa4e0c8efccfe" - integrity sha512-VKW4JPHzG5yhYQrQ1AzXgVgX8ZAJEvCz0QI6mLRX4tf7rnFfh5D8SKm0Pq6w5PyNfAWJk6sv313+nEt3ohWMBQ== + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz#e27e38cffa4a61226327c874a7be965e9a861624" + integrity sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew== dependencies: - "@typescript-eslint/scope-manager" "5.31.0" - "@typescript-eslint/type-utils" "5.31.0" - "@typescript-eslint/utils" "5.31.0" + "@typescript-eslint/scope-manager" "5.32.0" + "@typescript-eslint/type-utils" "5.32.0" + "@typescript-eslint/utils" "5.32.0" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -1600,68 +1643,68 @@ tsutils "^3.21.0" "@typescript-eslint/parser@^5": - version "5.31.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.31.0.tgz#7f42d7dcc68a0a6d80a0f3d9a65063aee7bb8d2c" - integrity sha512-UStjQiZ9OFTFReTrN+iGrC6O/ko9LVDhreEK5S3edmXgR396JGq7CoX2TWIptqt/ESzU2iRKXAHfSF2WJFcWHw== + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.32.0.tgz#1de243443bc6186fb153b9e395b842e46877ca5d" + integrity sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A== dependencies: - "@typescript-eslint/scope-manager" "5.31.0" - "@typescript-eslint/types" "5.31.0" - "@typescript-eslint/typescript-estree" "5.31.0" + "@typescript-eslint/scope-manager" "5.32.0" + "@typescript-eslint/types" "5.32.0" + "@typescript-eslint/typescript-estree" "5.32.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.31.0": - version "5.31.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.31.0.tgz#f47a794ba84d9b818ab7f8f44fff55a61016c606" - integrity sha512-8jfEzBYDBG88rcXFxajdVavGxb5/XKXyvWgvD8Qix3EEJLCFIdVloJw+r9ww0wbyNLOTYyBsR+4ALNGdlalLLg== +"@typescript-eslint/scope-manager@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz#763386e963a8def470580cc36cf9228864190b95" + integrity sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg== dependencies: - "@typescript-eslint/types" "5.31.0" - "@typescript-eslint/visitor-keys" "5.31.0" + "@typescript-eslint/types" "5.32.0" + "@typescript-eslint/visitor-keys" "5.32.0" -"@typescript-eslint/type-utils@5.31.0": - version "5.31.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.31.0.tgz#70a0b7201360b5adbddb0c36080495aa08f6f3d9" - integrity sha512-7ZYqFbvEvYXFn9ax02GsPcEOmuWNg+14HIf4q+oUuLnMbpJ6eHAivCg7tZMVwzrIuzX3QCeAOqKoyMZCv5xe+w== +"@typescript-eslint/type-utils@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz#45a14506fe3fb908600b4cef2f70778f7b5cdc79" + integrity sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg== dependencies: - "@typescript-eslint/utils" "5.31.0" + "@typescript-eslint/utils" "5.32.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.31.0": - version "5.31.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.31.0.tgz#7aa389122b64b18e473c1672fb3b8310e5f07a9a" - integrity sha512-/f/rMaEseux+I4wmR6mfpM2wvtNZb1p9hAV77hWfuKc3pmaANp5dLAZSiE3/8oXTYTt3uV9KW5yZKJsMievp6g== +"@typescript-eslint/types@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.32.0.tgz#484273021eeeae87ddb288f39586ef5efeb6dcd8" + integrity sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ== -"@typescript-eslint/typescript-estree@5.31.0": - version "5.31.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.31.0.tgz#eb92970c9d6e3946690d50c346fb9b1d745ee882" - integrity sha512-3S625TMcARX71wBc2qubHaoUwMEn+l9TCsaIzYI/ET31Xm2c9YQ+zhGgpydjorwQO9pLfR/6peTzS/0G3J/hDw== +"@typescript-eslint/typescript-estree@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz#282943f34babf07a4afa7b0ff347a8e7b6030d12" + integrity sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg== dependencies: - "@typescript-eslint/types" "5.31.0" - "@typescript-eslint/visitor-keys" "5.31.0" + "@typescript-eslint/types" "5.32.0" + "@typescript-eslint/visitor-keys" "5.32.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.31.0": - version "5.31.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.31.0.tgz#e146fa00dca948bfe547d665b2138a2dc1b79acd" - integrity sha512-kcVPdQS6VIpVTQ7QnGNKMFtdJdvnStkqS5LeALr4rcwx11G6OWb2HB17NMPnlRHvaZP38hL9iK8DdE9Fne7NYg== +"@typescript-eslint/utils@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.32.0.tgz#eccb6b672b94516f1afc6508d05173c45924840c" + integrity sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.31.0" - "@typescript-eslint/types" "5.31.0" - "@typescript-eslint/typescript-estree" "5.31.0" + "@typescript-eslint/scope-manager" "5.32.0" + "@typescript-eslint/types" "5.32.0" + "@typescript-eslint/typescript-estree" "5.32.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.31.0": - version "5.31.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.31.0.tgz#b0eca264df01ce85dceb76aebff3784629258f54" - integrity sha512-ZK0jVxSjS4gnPirpVjXHz7mgdOsZUHzNYSfTw2yPa3agfbt9YfqaBiBZFSSxeBWnpWkzCxTfUpnzA3Vily/CSg== +"@typescript-eslint/visitor-keys@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz#b9715d0b11fdb5dd10fd0c42ff13987470525394" + integrity sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g== dependencies: - "@typescript-eslint/types" "5.31.0" + "@typescript-eslint/types" "5.32.0" eslint-visitor-keys "^3.3.0" "@ungap/promise-all-settled@1.1.2": @@ -1840,7 +1883,7 @@ acorn-walk@^8.1.1, acorn-walk@^8.2.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1: +acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.0: version "8.8.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== @@ -2157,7 +2200,7 @@ babel-plugin-module-resolver@^4: reselect "^4.0.0" resolve "^1.13.1" -babel-plugin-polyfill-corejs2@^0.3.1: +babel-plugin-polyfill-corejs2@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.2.tgz#e4c31d4c89b56f3cf85b92558954c66b54bd972d" integrity sha512-LPnodUl3lS0/4wN3Rb+m+UK8s7lj2jcLRrjho4gLw+OJs+I4bvGXshINesY5xx/apM+biTnQ9reDI8yj+0M5+Q== @@ -2166,7 +2209,7 @@ babel-plugin-polyfill-corejs2@^0.3.1: "@babel/helper-define-polyfill-provider" "^0.3.2" semver "^6.1.1" -babel-plugin-polyfill-corejs3@^0.5.2: +babel-plugin-polyfill-corejs3@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.3.tgz#d7e09c9a899079d71a8b670c6181af56ec19c5c7" integrity sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw== @@ -2174,12 +2217,12 @@ babel-plugin-polyfill-corejs3@^0.5.2: "@babel/helper-define-polyfill-provider" "^0.3.2" core-js-compat "^3.21.0" -babel-plugin-polyfill-regenerator@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz#2c0678ea47c75c8cc2fbb1852278d8fb68233990" - integrity sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A== +babel-plugin-polyfill-regenerator@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.0.tgz#8f51809b6d5883e07e71548d75966ff7635527fe" + integrity sha512-RW1cnryiADFeHmfLS+WW/G431p1PsW5qdRdz0SDRi7TKcUgc7Oh/uXkT7MZ/+tGsT1BkczEAmD5XjUyJ5SWDTw== dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.1" + "@babel/helper-define-polyfill-provider" "^0.3.2" balanced-match@^1.0.0: version "1.0.2" @@ -2261,7 +2304,7 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserslist@^4.14.5, browserslist@^4.20.2, browserslist@^4.21.2: +browserslist@^4.14.5, browserslist@^4.20.2, browserslist@^4.21.3: version "4.21.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.3.tgz#5df277694eb3c48bc5c4b05af3e8b7e09c5a6d1a" integrity sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ== @@ -2276,7 +2319,7 @@ buffer-from@^1.0.0, buffer-from@^1.1.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -builtin-modules@^3.0.0: +builtin-modules@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== @@ -2587,22 +2630,22 @@ cookie@0.5.0: integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== core-js-compat@^3.21.0, core-js-compat@^3.22.1: - version "3.24.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.24.0.tgz#885958fac38bf3f4464a90f2663b4620f6aee6e3" - integrity sha512-F+2E63X3ff/nj8uIrf8Rf24UDGIz7p838+xjEp+Bx3y8OWXj+VTPPZNCtdqovPaS9o7Tka5mCH01Zn5vOd6UQg== + version "3.24.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.24.1.tgz#d1af84a17e18dfdd401ee39da9996f9a7ba887de" + integrity sha512-XhdNAGeRnTpp8xbD+sR/HFDK9CbeeeqXT6TuofXh3urqEevzkWmLRgrVoykodsw8okqo2pu1BOmuCKrHx63zdw== dependencies: - browserslist "^4.21.2" + browserslist "^4.21.3" semver "7.0.0" core-js-pure@^3.20.2: - version "3.24.0" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.24.0.tgz#10eeb90dbf0d670a6b22b081aecc7deb2faec7e1" - integrity sha512-uzMmW8cRh7uYw4JQtzqvGWRyC2T5+4zipQLQdi2FmiRqP83k3d6F3stv2iAlNhOs6cXN401FCD5TL0vvleuHgA== + version "3.24.1" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.24.1.tgz#8839dde5da545521bf282feb7dc6d0b425f39fd3" + integrity sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg== core-js@^3: - version "3.24.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.24.0.tgz#4928d4e99c593a234eb1a1f9abd3122b04d3ac57" - integrity sha512-IeOyT8A6iK37Ep4kZDD423mpi6JfPRoPUdQwEWYiGolvn4o6j2diaRzNfDfpTdu3a5qMbrGUzKUpYpRY8jXCkQ== + version "3.24.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.24.1.tgz#cf7724d41724154010a6576b7b57d94c5d66e64f" + integrity sha512-0QTBSYSUZ6Gq21utGzkfITDylE8jWC9Ne1D2MrhvlsZBI1x39OdDIVbzSqtgMndIy6BlHxBXpMGqzZmnztg2rg== core-util-is@~1.0.0: version "1.0.3" @@ -2852,9 +2895,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.202: - version "1.4.204" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.204.tgz#aae069adea642c066ea95faf5121262b0842e262" - integrity sha512-5Ojjtw9/c9HCXtMVE6SXVSHSNjmbFOXpKprl6mY/5moLSxLeWatuYA7KTD+RzJMxLRH6yNNQrqGz9p6IoNBMgw== + version "1.4.208" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.208.tgz#ecb5b47c8cc212a43172ffc5ce50178a638a5d74" + integrity sha512-diMr4t69FigAGUk2KovP0bygEtN/9AkqEVkzjEp0cu+zFFbZMVvwACpTTfuj1mAmFR5kNoSW8wGKDFWIvmThiQ== emittery@^0.11.0: version "0.11.0" @@ -2985,75 +3028,75 @@ es6-weak-map@^2.0.3: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -esbuild-android-64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.50.tgz#a46fc80fa2007690e647680d837483a750a3097f" - integrity sha512-H7iUEm7gUJHzidsBlFPGF6FTExazcgXL/46xxLo6i6bMtPim6ZmXyTccS8yOMpy6HAC6dPZ/JCQqrkkin69n6Q== - -esbuild-android-arm64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.50.tgz#bdda7851fa7f5f770d6ff0ad593a8945d3a0fcdd" - integrity sha512-NFaoqEwa+OYfoYVpQWDMdKII7wZZkAjtJFo1WdnBeCYlYikvUhTnf2aPwPu5qEAw/ie1NYK0yn3cafwP+kP+OQ== - -esbuild-darwin-64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.50.tgz#f0535435f9760766f30db14a991ee5ca94c022a4" - integrity sha512-gDQsCvGnZiJv9cfdO48QqxkRV8oKAXgR2CGp7TdIpccwFdJMHf8hyIJhMW/05b/HJjET/26Us27Jx91BFfEVSA== - -esbuild-darwin-arm64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.50.tgz#76a41a40e8947a15ae62970e9ed2853883c4b16c" - integrity sha512-36nNs5OjKIb/Q50Sgp8+rYW/PqirRiFN0NFc9hEvgPzNJxeJedktXwzfJSln4EcRFRh5Vz4IlqFRScp+aiBBzA== - -esbuild-freebsd-64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.50.tgz#2ed6633c17ed42c20a1bd68e82c4bbc75ea4fb57" - integrity sha512-/1pHHCUem8e/R86/uR+4v5diI2CtBdiWKiqGuPa9b/0x3Nwdh5AOH7lj+8823C6uX1e0ufwkSLkS+aFZiBCWxA== - -esbuild-freebsd-arm64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.50.tgz#cb115f4cdafe9cdbe58875ba482fccc54d32aa43" - integrity sha512-iKwUVMQztnPZe5pUYHdMkRc9aSpvoV1mkuHlCoPtxZA3V+Kg/ptpzkcSY+fKd0kuom+l6Rc93k0UPVkP7xoqrw== - -esbuild-linux-32@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.50.tgz#fe2b724994dcf1d4e48dc4832ff008ad7d00bcfd" - integrity sha512-sWUwvf3uz7dFOpLzYuih+WQ7dRycrBWHCdoXJ4I4XdMxEHCECd8b7a9N9u7FzT6XR2gHPk9EzvchQUtiEMRwqw== - -esbuild-linux-64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.50.tgz#7851ab5151df9501a2187bd4909c594ad232b623" - integrity sha512-u0PQxPhaeI629t4Y3EEcQ0wmWG+tC/LpP2K7yDFvwuPq0jSQ8SIN+ARNYfRjGW15O2we3XJvklbGV0wRuUCPig== - -esbuild-linux-arm64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.50.tgz#76a76afef484a0512f1fbbcc762edd705dee8892" - integrity sha512-ZyfoNgsTftD7Rp5S7La5auomKdNeB3Ck+kSKXC4pp96VnHyYGjHHXWIlcbH8i+efRn9brszo1/Thl1qn8RqmhQ== - -esbuild-linux-arm@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.50.tgz#6d7a8c0712091b0c3a668dd5d8b5c924adbaeb12" - integrity sha512-VALZq13bhmFJYFE/mLEb+9A0w5vo8z+YDVOWeaf9vOTrSC31RohRIwtxXBnVJ7YKLYfEMzcgFYf+OFln3Y0cWg== - -esbuild-linux-mips64le@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.50.tgz#43426909c1884c5dc6b40765673a08a7ec1d2064" - integrity sha512-ygo31Vxn/WrmjKCHkBoutOlFG5yM9J2UhzHb0oWD9O61dGg+Hzjz9hjf5cmM7FBhAzdpOdEWHIrVOg2YAi6rTw== - -esbuild-linux-ppc64le@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.50.tgz#c754ea3da1dd180c6e9b6b508dc18ce983d92b11" - integrity sha512-xWCKU5UaiTUT6Wz/O7GKP9KWdfbsb7vhfgQzRfX4ahh5NZV4ozZ4+SdzYG8WxetsLy84UzLX3Pi++xpVn1OkFQ== - -esbuild-linux-riscv64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.50.tgz#f3b2dd3c4c2b91bf191d3b98a9819c8aa6f5ad7f" - integrity sha512-0+dsneSEihZTopoO9B6Z6K4j3uI7EdxBP7YSF5rTwUgCID+wHD3vM1gGT0m+pjCW+NOacU9kH/WE9N686FHAJg== - -esbuild-linux-s390x@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.50.tgz#3dfbc4578b2a81995caabb79df2b628ea86a5390" - integrity sha512-tVjqcu8o0P9H4StwbIhL1sQYm5mWATlodKB6dpEZFkcyTI8kfIGWiWcrGmkNGH2i1kBUOsdlBafPxR3nzp3TDA== +esbuild-android-64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.51.tgz#414a087cb0de8db1e347ecca6c8320513de433db" + integrity sha512-6FOuKTHnC86dtrKDmdSj2CkcKF8PnqkaIXqvgydqfJmqBazCPdw+relrMlhGjkvVdiiGV70rpdnyFmA65ekBCQ== + +esbuild-android-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.51.tgz#55de3bce2aab72bcd2b606da4318ad00fb9c8151" + integrity sha512-vBtp//5VVkZWmYYvHsqBRCMMi1MzKuMIn5XDScmnykMTu9+TD9v0NMEDqQxvtFToeYmojdo5UCV2vzMQWJcJ4A== + +esbuild-darwin-64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.51.tgz#4259f23ed6b4cea2ec8a28d87b7fb9801f093754" + integrity sha512-YFmXPIOvuagDcwCejMRtCDjgPfnDu+bNeh5FU2Ryi68ADDVlWEpbtpAbrtf/lvFTWPexbgyKgzppNgsmLPr8PA== + +esbuild-darwin-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.51.tgz#d77b4366a71d84e530ba019d540b538b295d494a" + integrity sha512-juYD0QnSKwAMfzwKdIF6YbueXzS6N7y4GXPDeDkApz/1RzlT42mvX9jgNmyOlWKN7YzQAYbcUEJmZJYQGdf2ow== + +esbuild-freebsd-64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.51.tgz#27b6587b3639f10519c65e07219d249b01f2ad38" + integrity sha512-cLEI/aXjb6vo5O2Y8rvVSQ7smgLldwYY5xMxqh/dQGfWO+R1NJOFsiax3IS4Ng300SVp7Gz3czxT6d6qf2cw0g== + +esbuild-freebsd-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.51.tgz#63c435917e566808c71fafddc600aca4d78be1ec" + integrity sha512-TcWVw/rCL2F+jUgRkgLa3qltd5gzKjIMGhkVybkjk6PJadYInPtgtUBp1/hG+mxyigaT7ib+od1Xb84b+L+1Mg== + +esbuild-linux-32@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.51.tgz#c3da774143a37e7f11559b9369d98f11f997a5d9" + integrity sha512-RFqpyC5ChyWrjx8Xj2K0EC1aN0A37H6OJfmUXIASEqJoHcntuV3j2Efr9RNmUhMfNE6yEj2VpYuDteZLGDMr0w== + +esbuild-linux-64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.51.tgz#5d92b67f674e02ae0b4a9de9a757ba482115c4ae" + integrity sha512-dxjhrqo5i7Rq6DXwz5v+MEHVs9VNFItJmHBe1CxROWNf4miOGoQhqSG8StStbDkQ1Mtobg6ng+4fwByOhoQoeA== + +esbuild-linux-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.51.tgz#dac84740516e859d8b14e1ecc478dd5241b10c93" + integrity sha512-D9rFxGutoqQX3xJPxqd6o+kvYKeIbM0ifW2y0bgKk5HPgQQOo2k9/2Vpto3ybGYaFPCE5qTGtqQta9PoP6ZEzw== + +esbuild-linux-arm@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.51.tgz#b3ae7000696cd53ed95b2b458554ff543a60e106" + integrity sha512-LsJynDxYF6Neg7ZC7748yweCDD+N8ByCv22/7IAZglIEniEkqdF4HCaa49JNDLw1UQGlYuhOB8ZT/MmcSWzcWg== + +esbuild-linux-mips64le@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.51.tgz#dad10770fac94efa092b5a0643821c955a9dd385" + integrity sha512-vS54wQjy4IinLSlb5EIlLoln8buh1yDgliP4CuEHumrPk4PvvP4kTRIG4SzMXm6t19N0rIfT4bNdAxzJLg2k6A== + +esbuild-linux-ppc64le@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.51.tgz#b68c2f8294d012a16a88073d67e976edd4850ae0" + integrity sha512-xcdd62Y3VfGoyphNP/aIV9LP+RzFw5M5Z7ja+zdpQHHvokJM7d0rlDRMN+iSSwvUymQkqZO+G/xjb4/75du8BQ== + +esbuild-linux-riscv64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.51.tgz#608a318b8697123e44c1e185cdf6708e3df50b93" + integrity sha512-syXHGak9wkAnFz0gMmRBoy44JV0rp4kVCEA36P5MCeZcxFq8+fllBC2t6sKI23w3qd8Vwo9pTADCgjTSf3L3rA== + +esbuild-linux-s390x@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.51.tgz#c9e7791170a3295dba79b93aa452beb9838a8625" + integrity sha512-kFAJY3dv+Wq8o28K/C7xkZk/X34rgTwhknSsElIqoEo8armCOjMJ6NsMxm48KaWY2h2RUYGtQmr+RGuUPKBhyw== esbuild-loader@^2: version "2.19.0" @@ -3067,61 +3110,61 @@ esbuild-loader@^2: tapable "^2.2.0" webpack-sources "^2.2.0" -esbuild-netbsd-64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.50.tgz#17dbf51eaa48d983e794b588d195415410ef8c85" - integrity sha512-0R/glfqAQ2q6MHDf7YJw/TulibugjizBxyPvZIcorH0Mb7vSimdHy0XF5uCba5CKt+r4wjax1mvO9lZ4jiAhEg== +esbuild-netbsd-64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.51.tgz#0abd40b8c2e37fda6f5cc41a04cb2b690823d891" + integrity sha512-ZZBI7qrR1FevdPBVHz/1GSk1x5GDL/iy42Zy8+neEm/HA7ma+hH/bwPEjeHXKWUDvM36CZpSL/fn1/y9/Hb+1A== -esbuild-openbsd-64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.50.tgz#cf6b1a50c8cf67b0725aaa4bce9773976168c50e" - integrity sha512-7PAtmrR5mDOFubXIkuxYQ4bdNS6XCK8AIIHUiZxq1kL8cFIH5731jPcXQ4JNy/wbj1C9sZ8rzD8BIM80Tqk29w== +esbuild-openbsd-64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.51.tgz#4adba0b7ea7eb1428bb00d8e94c199a949b130e8" + integrity sha512-7R1/p39M+LSVQVgDVlcY1KKm6kFKjERSX1lipMG51NPcspJD1tmiZSmmBXoY5jhHIu6JL1QkFDTx94gMYK6vfA== -esbuild-sunos-64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.50.tgz#f705ae0dd914c3b45dc43319c4f532216c3d841f" - integrity sha512-gBxNY/wyptvD7PkHIYcq7se6SQEXcSC8Y7mE0FJB+CGgssEWf6vBPfTTZ2b6BWKnmaP6P6qb7s/KRIV5T2PxsQ== +esbuild-sunos-64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.51.tgz#4b8a6d97dfedda30a6e39607393c5c90ebf63891" + integrity sha512-HoHaCswHxLEYN8eBTtyO0bFEWvA3Kdb++hSQ/lLG7TyKF69TeSG0RNoBRAs45x/oCeWaTDntEZlYwAfQlhEtJA== -esbuild-windows-32@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.50.tgz#6364905a99c1e6c1e2fe7bfccebd958131b1cd6c" - integrity sha512-MOOe6J9cqe/iW1qbIVYSAqzJFh0p2LBLhVUIWdMVnNUNjvg2/4QNX4oT4IzgDeldU+Bym9/Tn6+DxvUHJXL5Zw== +esbuild-windows-32@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.51.tgz#d31d8ca0c1d314fb1edea163685a423b62e9ac17" + integrity sha512-4rtwSAM35A07CBt1/X8RWieDj3ZUHQqUOaEo5ZBs69rt5WAFjP4aqCIobdqOy4FdhYw1yF8Z0xFBTyc9lgPtEg== -esbuild-windows-64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.50.tgz#56603cb6367e30d14098deb77de6aa18d76dd89b" - integrity sha512-r/qE5Ex3w1jjGv/JlpPoWB365ldkppUlnizhMxJgojp907ZF1PgLTuW207kgzZcSCXyquL9qJkMsY+MRtaZ5yQ== +esbuild-windows-64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.51.tgz#7d3c09c8652d222925625637bdc7e6c223e0085d" + integrity sha512-HoN/5HGRXJpWODprGCgKbdMvrC3A2gqvzewu2eECRw2sYxOUoh2TV1tS+G7bHNapPGI79woQJGV6pFH7GH7qnA== -esbuild-windows-arm64@0.14.50: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.50.tgz#e7ddde6a97194051a5a4ac05f4f5900e922a7ea5" - integrity sha512-EMS4lQnsIe12ZyAinOINx7eq2mjpDdhGZZWDwPZE/yUTN9cnc2Ze/xUTYIAyaJqrqQda3LnDpADKpvLvol6ENQ== +esbuild-windows-arm64@0.14.51: + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.51.tgz#0220d2304bfdc11bc27e19b2aaf56edf183e4ae9" + integrity sha512-JQDqPjuOH7o+BsKMSddMfmVJXrnYZxXDHsoLHc0xgmAZkOOCflRmC43q31pk79F9xuyWY45jDBPolb5ZgGOf9g== esbuild@^0, esbuild@^0.14.39: - version "0.14.50" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.50.tgz#7a665392c8df94bf6e1ae1e999966a5ee62c6cbc" - integrity sha512-SbC3k35Ih2IC6trhbMYW7hYeGdjPKf9atTKwBUHqMCYFZZ9z8zhuvfnZihsnJypl74FjiAKjBRqFkBkAd0rS/w== + version "0.14.51" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.51.tgz#1c8ecbc8db3710da03776211dc3ee3448f7aa51e" + integrity sha512-+CvnDitD7Q5sT7F+FM65sWkF8wJRf+j9fPcprxYV4j+ohmzVj2W7caUqH2s5kCaCJAfcAICjSlKhDCcvDpU7nw== optionalDependencies: - esbuild-android-64 "0.14.50" - esbuild-android-arm64 "0.14.50" - esbuild-darwin-64 "0.14.50" - esbuild-darwin-arm64 "0.14.50" - esbuild-freebsd-64 "0.14.50" - esbuild-freebsd-arm64 "0.14.50" - esbuild-linux-32 "0.14.50" - esbuild-linux-64 "0.14.50" - esbuild-linux-arm "0.14.50" - esbuild-linux-arm64 "0.14.50" - esbuild-linux-mips64le "0.14.50" - esbuild-linux-ppc64le "0.14.50" - esbuild-linux-riscv64 "0.14.50" - esbuild-linux-s390x "0.14.50" - esbuild-netbsd-64 "0.14.50" - esbuild-openbsd-64 "0.14.50" - esbuild-sunos-64 "0.14.50" - esbuild-windows-32 "0.14.50" - esbuild-windows-64 "0.14.50" - esbuild-windows-arm64 "0.14.50" + esbuild-android-64 "0.14.51" + esbuild-android-arm64 "0.14.51" + esbuild-darwin-64 "0.14.51" + esbuild-darwin-arm64 "0.14.51" + esbuild-freebsd-64 "0.14.51" + esbuild-freebsd-arm64 "0.14.51" + esbuild-linux-32 "0.14.51" + esbuild-linux-64 "0.14.51" + esbuild-linux-arm "0.14.51" + esbuild-linux-arm64 "0.14.51" + esbuild-linux-mips64le "0.14.51" + esbuild-linux-ppc64le "0.14.51" + esbuild-linux-riscv64 "0.14.51" + esbuild-linux-s390x "0.14.51" + esbuild-netbsd-64 "0.14.51" + esbuild-openbsd-64 "0.14.51" + esbuild-sunos-64 "0.14.51" + esbuild-windows-32 "0.14.51" + esbuild-windows-64 "0.14.51" + esbuild-windows-arm64 "0.14.51" escalade@^3.1.1: version "3.1.1" @@ -3276,12 +3319,13 @@ eslint-visitor-keys@^3.3.0: integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@^8: - version "8.20.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.20.0.tgz#048ac56aa18529967da8354a478be4ec0a2bc81b" - integrity sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA== + version "8.21.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.21.0.tgz#1940a68d7e0573cef6f50037addee295ff9be9ef" + integrity sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA== dependencies: "@eslint/eslintrc" "^1.3.0" - "@humanwhocodes/config-array" "^0.9.2" + "@humanwhocodes/config-array" "^0.10.4" + "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -3291,14 +3335,17 @@ eslint@^8: eslint-scope "^7.1.1" eslint-utils "^3.0.0" eslint-visitor-keys "^3.3.0" - espree "^9.3.2" + espree "^9.3.3" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" + find-up "^5.0.0" functional-red-black-tree "^1.0.1" glob-parent "^6.0.1" globals "^13.15.0" + globby "^11.1.0" + grapheme-splitter "^1.0.4" ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -3316,12 +3363,12 @@ eslint@^8: text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^9.3.2: - version "9.3.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" - integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA== +espree@^9.3.2, espree@^9.3.3: + version "9.3.3" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.3.tgz#2dd37c4162bb05f433ad3c1a52ddf8a49dc08e9d" + integrity sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng== dependencies: - acorn "^8.7.1" + acorn "^8.8.0" acorn-jsx "^5.3.2" eslint-visitor-keys "^3.3.0" @@ -3567,7 +3614,7 @@ find-cache-dir@^3.3.1, find-cache-dir@^3.3.2: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-up@5.0.0: +find-up@5.0.0, find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -3825,6 +3872,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + handle-thing@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" @@ -4098,11 +4150,11 @@ is-boolean-object@^1.1.0: has-tostringtag "^1.0.0" is-builtin-module@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.1.0.tgz#6fdb24313b1c03b75f8b9711c0feb8c30b903b00" - integrity sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.0.tgz#bb0310dfe881f144ca83f30100ceb10cf58835e0" + integrity sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw== dependencies: - builtin-modules "^3.0.0" + builtin-modules "^3.3.0" is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" @@ -6262,9 +6314,9 @@ type@^1.0.1: integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== type@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/type/-/type-2.6.0.tgz#3ca6099af5981d36ca86b78442973694278a219f" - integrity sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ== + version "2.6.1" + resolved "https://registry.yarnpkg.com/type/-/type-2.6.1.tgz#808f389ec777205cc3cd97c1c88ec1a913105aae" + integrity sha512-OvgH5rB0XM+iDZGQ1Eg/o7IZn0XYJFVrN/9FQ4OWIYILyJJgVP2s1hLTOFn6UOZoDUI/HctGa0PFlE2n2HW3NQ== typescript@^4: version "4.7.4"