mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-10-21 08:51:39 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3f6181c29 | ||
|
|
13e95c96d0 | ||
|
|
ae1cad3bb5 | ||
|
|
93c38b749c |
@@ -1,5 +1,17 @@
|
||||
# @openstapps/backend
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- 93c38b74: dependency updates
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/core-tools@4.0.7
|
||||
- @openstapps/core@4.0.7
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend",
|
||||
"description": "A reference implementation for a StApps backend",
|
||||
"version": "4.0.6",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
@@ -43,7 +43,7 @@
|
||||
"test:unit": "cross-env NODE_CONFIG_ENV=elasticsearch ALLOW_NO_TRANSPORT=true STAPPS_LOG_LEVEL=0 mocha --exit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/elasticsearch": "8.19.2",
|
||||
"@elastic/elasticsearch": "8.14.1",
|
||||
"@openstapps/core": "workspace:*",
|
||||
"@openstapps/core-tools": "workspace:*",
|
||||
"@openstapps/logger": "workspace:*",
|
||||
@@ -53,7 +53,6 @@
|
||||
"@types/geojson": "1.0.6",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/node-cron": "3.0.7",
|
||||
"@types/nodemailer": "8.0.2",
|
||||
"@types/promise-queue": "2.2.0",
|
||||
"@types/uuid": "8.3.4",
|
||||
"body-parser": "1.20.3",
|
||||
@@ -63,13 +62,13 @@
|
||||
"express": "4.21.2",
|
||||
"express-prom-bundle": "6.6.0",
|
||||
"express-promise-router": "4.1.1",
|
||||
"got": "12.6.0",
|
||||
"got": "14.6.6",
|
||||
"moment": "2.30.1",
|
||||
"morgan": "1.10.1",
|
||||
"nock": "13.3.1",
|
||||
"node-cache": "5.1.2",
|
||||
"node-cron": "3.0.2",
|
||||
"nodemailer": "8.0.11",
|
||||
"nodemailer": "10.1.7",
|
||||
"prom-client": "14.1.1",
|
||||
"promise-queue": "2.2.5",
|
||||
"uuid": "8.3.2"
|
||||
|
||||
@@ -13,7 +13,12 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {
|
||||
AggregateName,
|
||||
AggregationsAggregate,
|
||||
AggregationsFiltersAggregate,
|
||||
AggregationsMultiTermsBucket,
|
||||
} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCFacet, SCThingType} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
@@ -21,16 +26,16 @@ import {SCFacet, SCThingType} from '@openstapps/core';
|
||||
* @param aggregationResponse - aggregations response from elasticsearch
|
||||
*/
|
||||
export function parseAggregations(
|
||||
aggregationResponse: Record<estypes.AggregateName, estypes.AggregationsAggregate>,
|
||||
aggregationResponse: Record<AggregateName, AggregationsAggregate>,
|
||||
): SCFacet[] {
|
||||
const facets: SCFacet[] = [];
|
||||
|
||||
for (const aggregateName in aggregationResponse) {
|
||||
const aggregation = aggregationResponse[aggregateName] as estypes.AggregationsMultiTermsBucket;
|
||||
const aggregation = aggregationResponse[aggregateName] as AggregationsMultiTermsBucket;
|
||||
const type = aggregateName === '@all' ? {} : {onlyOnType: aggregateName as SCThingType};
|
||||
|
||||
for (const field in aggregation) {
|
||||
const fieldAggregate = aggregation[field] as estypes.AggregationsFiltersAggregate;
|
||||
const fieldAggregate = aggregation[field] as AggregationsFiltersAggregate;
|
||||
if (typeof fieldAggregate !== 'object') continue;
|
||||
|
||||
const buckets = Object.values(fieldAggregate.buckets).map(bucket => {
|
||||
|
||||
@@ -14,7 +14,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Client, events} from '@elastic/elasticsearch';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {
|
||||
AggregateName,
|
||||
AggregationsMultiTermsBucket,
|
||||
IndicesGetAliasResponse,
|
||||
SearchHit,
|
||||
SearchResponse,
|
||||
} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCConfigFile, SCSearchQuery, SCSearchResponse, SCThings, SCUuid} from '@openstapps/core';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import moment from 'moment';
|
||||
@@ -107,9 +113,7 @@ export class Elasticsearch implements Database {
|
||||
/**
|
||||
* Gets a map which contains each alias and all indices that are associated with each alias
|
||||
*/
|
||||
private async cleanupDeadIndices(
|
||||
retryOptions: Partial<RetryOptions<estypes.IndicesGetAliasResponse>> = {},
|
||||
) {
|
||||
private async cleanupDeadIndices(retryOptions: Partial<RetryOptions<IndicesGetAliasResponse>> = {}) {
|
||||
const aliasResponse = await retryCatch({
|
||||
maxRetries: 10,
|
||||
retryInterval: 2000,
|
||||
@@ -143,7 +147,7 @@ export class Elasticsearch implements Database {
|
||||
* @param uid an UID to use for the search
|
||||
* @returns an elasticsearch object containing the thing
|
||||
*/
|
||||
private async getObject(uid: SCUuid): Promise<estypes.SearchHit<SCThings> | undefined> {
|
||||
private async getObject(uid: SCUuid): Promise<SearchHit<SCThings> | undefined> {
|
||||
const searchResponse = await this.client.search<SCThings>({
|
||||
body: {
|
||||
query: {
|
||||
@@ -269,9 +273,7 @@ export class Elasticsearch implements Database {
|
||||
/**
|
||||
* Initialize the elasticsearch database (call all needed methods)
|
||||
*/
|
||||
public async init(
|
||||
retryOptions: Partial<RetryOptions<estypes.IndicesGetAliasResponse>> = {},
|
||||
): Promise<void> {
|
||||
public async init(retryOptions: Partial<RetryOptions<IndicesGetAliasResponse>> = {}): Promise<void> {
|
||||
const monitoringConfiguration = this.config.internal.monitoring;
|
||||
|
||||
if (monitoringConfiguration !== undefined) {
|
||||
@@ -371,7 +373,7 @@ export class Elasticsearch implements Database {
|
||||
| undefined,
|
||||
};
|
||||
|
||||
const response: estypes.SearchResponse<SCThings> = await this.client.search({
|
||||
const response: SearchResponse<SCThings> = await this.client.search({
|
||||
aggs: aggregations,
|
||||
query: buildQuery(parameters, this.config, esConfig),
|
||||
from: parameters.from,
|
||||
@@ -392,9 +394,7 @@ export class Elasticsearch implements Database {
|
||||
facets:
|
||||
response.aggregations === undefined
|
||||
? []
|
||||
: parseAggregations(
|
||||
response.aggregations as Record<estypes.AggregateName, estypes.AggregationsMultiTermsBucket>,
|
||||
),
|
||||
: parseAggregations(response.aggregations as Record<AggregateName, AggregationsMultiTermsBucket>),
|
||||
pagination: {
|
||||
count: response.hits.hits.length,
|
||||
offset: typeof parameters.from === 'number' ? parameters.from : 0,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Client} from '@elastic/elasticsearch';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SearchRequest} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {
|
||||
SCMonitoringConfiguration,
|
||||
SCMonitoringLogAction,
|
||||
@@ -128,7 +128,7 @@ export async function setUp(
|
||||
|
||||
cron.schedule(trigger.executionTime, async () => {
|
||||
// execute watch (search->condition->action)
|
||||
const result = await esClient.search<SCThings>(watcher.query as estypes.SearchRequest);
|
||||
const result = await esClient.search<SCThings>(watcher.query as SearchRequest);
|
||||
|
||||
// check conditions
|
||||
const total =
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslFunctionScoreContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCBackendConfigurationSearchBoostingType} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
|
||||
@@ -22,8 +22,8 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
*/
|
||||
export function buildFunctionsForBoostingTypes(
|
||||
boostingTypes: SCBackendConfigurationSearchBoostingType[],
|
||||
): estypes.QueryDslFunctionScoreContainer[] {
|
||||
const functions: estypes.QueryDslFunctionScoreContainer[] = [];
|
||||
): QueryDslFunctionScoreContainer[] {
|
||||
const functions: QueryDslFunctionScoreContainer[] = [];
|
||||
|
||||
for (const boostingForOneSCType of boostingTypes) {
|
||||
const typeFilter: QueryDslSpecificQueryContainer<'term'> = {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslFunctionScoreContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCBackendConfigurationSearchBoostingContext, SCSearchContext} from '@openstapps/core';
|
||||
import {buildFunctionsForBoostingTypes} from './boost-functions.js';
|
||||
|
||||
@@ -24,7 +24,7 @@ import {buildFunctionsForBoostingTypes} from './boost-functions.js';
|
||||
export function buildScoringFunctions(
|
||||
boostings: SCBackendConfigurationSearchBoostingContext,
|
||||
context: SCSearchContext | undefined,
|
||||
): estypes.QueryDslFunctionScoreContainer[] {
|
||||
): QueryDslFunctionScoreContainer[] {
|
||||
// default context
|
||||
let functions = buildFunctionsForBoostingTypes(boostings['default' as SCSearchContext]);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslQueryContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCSearchFilter} from '@openstapps/core';
|
||||
import {buildBooleanFilter} from './filters/boolean.js';
|
||||
import {buildAvailabilityFilter} from './filters/availability.js';
|
||||
@@ -26,7 +26,7 @@ import {buildValueFilter} from './filters/value.js';
|
||||
* Converts Array of Filters to elasticsearch query-syntax
|
||||
* @param filter A search filter for the retrieval of the data
|
||||
*/
|
||||
export function buildFilter(filter: SCSearchFilter): estypes.QueryDslQueryContainer {
|
||||
export function buildFilter(filter: SCSearchFilter): QueryDslQueryContainer {
|
||||
switch (filter.type) {
|
||||
case 'value': {
|
||||
return buildValueFilter(filter);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslBoolQuery} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCSearchBooleanFilter} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
import {buildFilter} from '../filter.js';
|
||||
@@ -22,7 +22,7 @@ import {buildFilter} from '../filter.js';
|
||||
* @param filter A search filter for the retrieval of the data
|
||||
*/
|
||||
export function buildBooleanFilter(filter: SCSearchBooleanFilter): QueryDslSpecificQueryContainer<'bool'> {
|
||||
const result: estypes.QueryDslBoolQuery = {
|
||||
const result: QueryDslBoolQuery = {
|
||||
minimum_should_match: 0,
|
||||
must: [],
|
||||
must_not: [],
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslDateRangeQuery} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCSearchDateRangeFilter} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
|
||||
@@ -23,7 +23,7 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
export function buildDateRangeFilter(
|
||||
filter: SCSearchDateRangeFilter,
|
||||
): QueryDslSpecificQueryContainer<'range'> {
|
||||
const dateRangeObject: estypes.QueryDslDateRangeQuery = {
|
||||
const dateRangeObject: QueryDslDateRangeQuery = {
|
||||
format: filter.arguments.format,
|
||||
time_zone: filter.arguments.timeZone,
|
||||
relation: filter.arguments.relation,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslGeoDistanceQuery} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCSearchDistanceFilter} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
|
||||
@@ -23,7 +23,7 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
export function buildDistanceFilter(
|
||||
filter: SCSearchDistanceFilter,
|
||||
): QueryDslSpecificQueryContainer<'geo_distance'> {
|
||||
const geoObject: estypes.QueryDslGeoDistanceQuery = {
|
||||
const geoObject: QueryDslGeoDistanceQuery = {
|
||||
distance: `${filter.arguments.distance}m`,
|
||||
[`${filter.arguments.field}.point`]: {
|
||||
lat: filter.arguments.position[1],
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslNumberRangeQuery} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCSearchNumericRangeFilter} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
|
||||
@@ -23,7 +23,7 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
export function buildNumericRangeFilter(
|
||||
filter: SCSearchNumericRangeFilter,
|
||||
): QueryDslSpecificQueryContainer<'range'> {
|
||||
const numericRangeObject: estypes.QueryDslNumberRangeQuery = {
|
||||
const numericRangeObject: QueryDslNumberRangeQuery = {
|
||||
relation: filter.arguments.relation,
|
||||
};
|
||||
if (filter.arguments.bounds.lowerBound?.mode === 'exclusive') {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslQueryContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCConfigFile, SCSearchQuery} from '@openstapps/core';
|
||||
import {ElasticsearchConfig} from '../types/elasticsearch-config.js';
|
||||
import {buildFilter} from './filter.js';
|
||||
@@ -29,7 +29,7 @@ export const buildQuery = function buildQuery(
|
||||
parameters: SCSearchQuery,
|
||||
defaultConfig: SCConfigFile,
|
||||
elasticsearchConfig: ElasticsearchConfig,
|
||||
): estypes.QueryDslQueryContainer {
|
||||
): QueryDslQueryContainer {
|
||||
// if config provides a minMatch parameter, we use query_string instead of a match query
|
||||
let query;
|
||||
if (elasticsearchConfig.query === undefined) {
|
||||
@@ -83,7 +83,7 @@ export const buildQuery = function buildQuery(
|
||||
);
|
||||
}
|
||||
|
||||
const functionScoreQuery: estypes.QueryDslQueryContainer = {
|
||||
const functionScoreQuery: QueryDslQueryContainer = {
|
||||
function_score: {
|
||||
functions: buildScoringFunctions(defaultConfig.internal.boostings, parameters.context),
|
||||
query: {
|
||||
@@ -97,8 +97,7 @@ export const buildQuery = function buildQuery(
|
||||
},
|
||||
};
|
||||
|
||||
const mustMatch = (functionScoreQuery.function_score as estypes.QueryDslFunctionScoreQuery | undefined)
|
||||
?.query?.bool?.must;
|
||||
const mustMatch = functionScoreQuery.function_score?.query?.bool?.must;
|
||||
|
||||
if (Array.isArray(mustMatch)) {
|
||||
if (query !== undefined) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {Sort} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCSearchSort} from '@openstapps/core';
|
||||
import {buildDistanceSort} from './sort/distance.js';
|
||||
import {buildDucetSort} from './sort/ducet.js';
|
||||
@@ -24,7 +24,7 @@ import {buildPriceSort} from './sort/price.js';
|
||||
* @param sorts Sorting rules to apply to the data that is being queried
|
||||
* @returns an array of sort queries
|
||||
*/
|
||||
export const buildSort = function buildSort(sorts: SCSearchSort[]): estypes.Sort {
|
||||
export const buildSort = function buildSort(sorts: SCSearchSort[]): Sort {
|
||||
return sorts.map(sort => {
|
||||
switch (sort.type) {
|
||||
case 'generic': {
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SortOptions} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCDistanceSort} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
* Converts a distance sort to elasticsearch syntax
|
||||
* @param sort A sorting definition
|
||||
*/
|
||||
export function buildDistanceSort(sort: SCDistanceSort): estypes.SortOptions {
|
||||
export function buildDistanceSort(sort: SCDistanceSort): SortOptions {
|
||||
return {
|
||||
_geo_distance: {
|
||||
mode: 'avg',
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SortOptions} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCDucetSort} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
* Converts a ducet sort to elasticsearch syntax
|
||||
* @param sort A sorting definition
|
||||
*/
|
||||
export function buildDucetSort(sort: SCDucetSort): estypes.SortOptions {
|
||||
export function buildDucetSort(sort: SCDucetSort): SortOptions {
|
||||
return {
|
||||
[`${sort.arguments.field}.sort`]: sort.order,
|
||||
};
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SortOptions} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCGenericSort} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
* Converts a generic sort to elasticsearch syntax
|
||||
* @param sort A sorting definition
|
||||
*/
|
||||
export function buildGenericSort(sort: SCGenericSort): estypes.SortOptions {
|
||||
export function buildGenericSort(sort: SCGenericSort): SortOptions {
|
||||
return {
|
||||
[sort.arguments.field]: sort.order,
|
||||
};
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SortOptions} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCPriceSort, SCSportCoursePriceGroup, SCThingsField} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
* Converts a price sort to elasticsearch syntax
|
||||
* @param sort A sorting definition
|
||||
*/
|
||||
export function buildPriceSort(sort: SCPriceSort): estypes.SortOptions {
|
||||
export function buildPriceSort(sort: SCPriceSort): SortOptions {
|
||||
return {
|
||||
_script: {
|
||||
order: sort.order,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Client, estypes} from '@elastic/elasticsearch';
|
||||
import {Client} from '@elastic/elasticsearch';
|
||||
import {SCThingType} from '@openstapps/core';
|
||||
import type {AggregationSchema} from '@openstapps/core/lib/mappings/aggregations.json.js';
|
||||
import type {ElasticsearchTemplateCollection} from '@openstapps/core/lib/mappings/mappings.json.js';
|
||||
@@ -36,10 +36,7 @@ export const aggregations = JSON.parse(
|
||||
* @param client An elasticsearch client to use
|
||||
* @param type the SCThingType of which the template should be set
|
||||
*/
|
||||
export async function putTemplate(
|
||||
client: Client,
|
||||
type: SCThingType,
|
||||
): Promise<estypes.IndicesPutTemplateResponse> {
|
||||
export async function putTemplate(client: Client, type: SCThingType) {
|
||||
const sanitizedType = `template_${type.replaceAll(/\s/g, '_')}`;
|
||||
|
||||
return client.indices.putTemplate({
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslQueryContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
|
||||
export type QueryDslSpecificQueryContainer<T extends keyof estypes.QueryDslQueryContainer> = Required<
|
||||
Pick<estypes.QueryDslQueryContainer, T>
|
||||
export type QueryDslSpecificQueryContainer<T extends keyof QueryDslQueryContainer> = Required<
|
||||
Pick<QueryDslQueryContainer, T>
|
||||
>;
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {AggregateName, AggregationsMultiTermsBucket} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {SCFacet, SCThingType} from '@openstapps/core';
|
||||
import {expect} from 'chai';
|
||||
import {parseAggregations} from '../../../src/storage/elasticsearch/aggregations.js';
|
||||
|
||||
describe('Aggregations', function () {
|
||||
const aggregations: Record<estypes.AggregateName, Partial<estypes.AggregationsMultiTermsBucket>> = {
|
||||
const aggregations: Record<AggregateName, Partial<AggregationsMultiTermsBucket>> = {
|
||||
'catalog': {
|
||||
'doc_count': 4,
|
||||
'superCatalogs.categories': {
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Client, Diagnostic, estypes} from '@elastic/elasticsearch';
|
||||
import {Client, Diagnostic} from '@elastic/elasticsearch';
|
||||
import Indices from '@elastic/elasticsearch/lib/api/api/indices.js';
|
||||
import {CreateResponse, SearchHit, SearchResponse} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {
|
||||
SCBook,
|
||||
SCBulkResponse,
|
||||
@@ -50,7 +52,6 @@ import {query} from './query.js';
|
||||
import messageFile from '@openstapps/core/test/resources/indexable/Message.1.json' with {type: 'json'};
|
||||
import bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' with {type: 'json'};
|
||||
|
||||
const indicesPrototype = Object.getPrototypeOf(new Client({node: 'http://localhost:9200'}).indices);
|
||||
const message = messageFile.instance as SCMessage;
|
||||
const book = bookFile.instance as SCBook;
|
||||
|
||||
@@ -59,7 +60,7 @@ use(chaiAsPromised);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function searchResponse<T>(...hits: estypes.SearchHit<T>[]): estypes.SearchResponse<T> {
|
||||
function searchResponse<T>(...hits: SearchHit<T>[]): SearchResponse<T> {
|
||||
return {hits: {hits}, took: 0, timed_out: false, _shards: {total: 1, failed: 0, successful: 1}};
|
||||
}
|
||||
|
||||
@@ -311,13 +312,13 @@ describe('Elasticsearch', function () {
|
||||
|
||||
beforeEach(function () {
|
||||
sandbox
|
||||
.stub(indicesPrototype, 'getAlias')
|
||||
.stub(Indices.default.prototype, 'getAlias')
|
||||
.resolves({[oldIndex]: {aliases: {[SCThingType.Book]: {}}}} as any);
|
||||
sandbox.stub(indicesPrototype, 'putTemplate').resolves({} as any);
|
||||
createStub = sandbox.stub(indicesPrototype, 'create').resolves({} as any);
|
||||
deleteStub = sandbox.stub(indicesPrototype, 'delete').resolves({} as any);
|
||||
refreshStub = sandbox.stub(indicesPrototype, 'refresh').resolves({} as any);
|
||||
updateAliasesStub = sandbox.stub(indicesPrototype, 'updateAliases').resolves({} as any);
|
||||
sandbox.stub(Indices.default.prototype, 'putTemplate').resolves({} as any);
|
||||
createStub = sandbox.stub(Indices.default.prototype, 'create').resolves({} as any);
|
||||
deleteStub = sandbox.stub(Indices.default.prototype, 'delete').resolves({} as any);
|
||||
refreshStub = sandbox.stub(Indices.default.prototype, 'refresh').resolves({} as any);
|
||||
updateAliasesStub = sandbox.stub(Indices.default.prototype, 'updateAliases').resolves({} as any);
|
||||
es = new Elasticsearch(backendConfig);
|
||||
});
|
||||
|
||||
@@ -444,7 +445,7 @@ describe('Elasticsearch', function () {
|
||||
});
|
||||
|
||||
it('should provide the thing if object is found', async function () {
|
||||
const foundObject: estypes.SearchHit<SCMessage> = {
|
||||
const foundObject: SearchHit<SCMessage> = {
|
||||
_id: '',
|
||||
_index: '',
|
||||
_score: 0,
|
||||
@@ -465,7 +466,7 @@ describe('Elasticsearch', function () {
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
sandbox.stub(indicesPrototype, 'getAlias').resolves({} as any);
|
||||
sandbox.stub(Indices.default.prototype, 'getAlias').resolves({} as any);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
@@ -475,7 +476,7 @@ describe('Elasticsearch', function () {
|
||||
it('should not post if the object already exists in an index which will not be rolled over', async function () {
|
||||
const index = getIndex();
|
||||
const oldIndex = index.replace('foosource', 'barsource');
|
||||
const object: estypes.SearchHit<SCMessage> = {
|
||||
const object: SearchHit<SCMessage> = {
|
||||
_id: '',
|
||||
_index: oldIndex,
|
||||
_source: message,
|
||||
@@ -489,7 +490,7 @@ describe('Elasticsearch', function () {
|
||||
|
||||
it('should reject if there is an object creation error on the elasticsearch side', async function () {
|
||||
sandbox.stub(es.client, 'search').resolves(searchResponse());
|
||||
sandbox.stub(es.client, 'create').resolves({result: 'not_found'} as estypes.CreateResponse);
|
||||
sandbox.stub(es.client, 'create').resolves({result: 'not_found'} as CreateResponse);
|
||||
|
||||
await es.init();
|
||||
return expect(es.post(message, bulk)).to.rejectedWith('creation');
|
||||
@@ -526,7 +527,7 @@ describe('Elasticsearch', function () {
|
||||
sandbox.restore();
|
||||
});
|
||||
it('should reject to put if the object does not already exist', async function () {
|
||||
const object: estypes.SearchHit<SCMessage> = {
|
||||
const object: SearchHit<SCMessage> = {
|
||||
_id: '',
|
||||
_index: getIndex(),
|
||||
_score: 0,
|
||||
@@ -540,7 +541,7 @@ describe('Elasticsearch', function () {
|
||||
// noinspection JSUnusedLocalSymbols
|
||||
it('should update the object if it already exists', async function () {
|
||||
let caughtParameter: any;
|
||||
const object: estypes.SearchHit<SCMessage> = {
|
||||
const object: SearchHit<SCMessage> = {
|
||||
_id: '',
|
||||
_index: getIndex(),
|
||||
_score: 0,
|
||||
@@ -563,13 +564,13 @@ describe('Elasticsearch', function () {
|
||||
describe('search', async function () {
|
||||
let es: Elasticsearch;
|
||||
const sandbox = sinon.createSandbox();
|
||||
const objectMessage: estypes.SearchHit<SCMessage> = {
|
||||
const objectMessage: SearchHit<SCMessage> = {
|
||||
_id: '123',
|
||||
_index: getIndex(),
|
||||
_score: 0,
|
||||
_source: message,
|
||||
};
|
||||
const objectBook: estypes.SearchHit<SCBook> = {
|
||||
const objectBook: SearchHit<SCBook> = {
|
||||
_id: '321',
|
||||
_index: getIndex(),
|
||||
_score: 0,
|
||||
@@ -594,7 +595,7 @@ describe('Elasticsearch', function () {
|
||||
},
|
||||
},
|
||||
};
|
||||
const fakeSearchResponse: estypes.SearchResponse<SCThings> = {
|
||||
const fakeSearchResponse: SearchResponse<SCThings> = {
|
||||
took: 12,
|
||||
timed_out: false,
|
||||
// @ts-expect-error not assignable
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Client} from '@elastic/elasticsearch';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SearchResponse} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {
|
||||
SCMonitoringConfiguration,
|
||||
SCMonitoringLogAction,
|
||||
@@ -111,7 +111,7 @@ describe('Monitoring', async function () {
|
||||
});
|
||||
|
||||
it('should log errors where conditions failed', async function () {
|
||||
const fakeSearchResponse: estypes.SearchResponse<SCThings> = {
|
||||
const fakeSearchResponse: SearchResponse<SCThings> = {
|
||||
took: 12,
|
||||
timed_out: false,
|
||||
// @ts-expect-error not assignable
|
||||
|
||||
@@ -31,7 +31,7 @@ import {buildQuery} from '../../../src/storage/elasticsearch/query/query.js';
|
||||
import {buildSort} from '../../../src/storage/elasticsearch/query/sort.js';
|
||||
import {ElasticsearchConfig} from '../../../src/storage/elasticsearch/types/elasticsearch-config.js';
|
||||
import {QueryDslSpecificQueryContainer} from '../../../src/storage/elasticsearch/types/util.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslRangeQuery, SortCombinations} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {backendConfig} from '../../../src/config.js';
|
||||
|
||||
describe('Query', function () {
|
||||
@@ -364,9 +364,9 @@ describe('Query', function () {
|
||||
expect(filter).to.deep.equal(expectedFilter);
|
||||
for (const bound of ['g', 'l']) {
|
||||
const inclusiveExists =
|
||||
typeof filter.range.price?.[`${bound}t` as keyof estypes.QueryDslRangeQuery] !== 'undefined';
|
||||
typeof filter.range.price?.[`${bound}t` as keyof QueryDslRangeQuery] !== 'undefined';
|
||||
const exclusiveExists =
|
||||
typeof filter.range.price?.[`${bound}te` as keyof estypes.QueryDslRangeQuery] !== 'undefined';
|
||||
typeof filter.range.price?.[`${bound}te` as keyof QueryDslRangeQuery] !== 'undefined';
|
||||
|
||||
// only one should exist at the same time
|
||||
expect(inclusiveExists && exclusiveExists).to.be.false;
|
||||
@@ -623,8 +623,8 @@ describe('Query', function () {
|
||||
},
|
||||
},
|
||||
];
|
||||
let sorts: estypes.SortCombinations[] = [];
|
||||
const expectedSorts: {[key: string]: estypes.SortCombinations} = {
|
||||
let sorts: SortCombinations[] = [];
|
||||
const expectedSorts: {[key: string]: SortCombinations} = {
|
||||
ducet: {
|
||||
'name.sort': 'desc',
|
||||
},
|
||||
@@ -651,7 +651,7 @@ describe('Query', function () {
|
||||
},
|
||||
};
|
||||
before(function () {
|
||||
sorts = buildSort(searchSCSearchSort) as estypes.SortCombinations[];
|
||||
sorts = buildSort(searchSCSearchSort) as SortCombinations[];
|
||||
});
|
||||
|
||||
it('should build ducet sort', function () {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {QueryDslQueryContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
|
||||
export const query: estypes.QueryDslQueryContainer = {
|
||||
export const query: QueryDslQueryContainer = {
|
||||
function_score: {
|
||||
functions: [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/database
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM elasticsearch:8.19.21
|
||||
FROM elasticsearch:8.14.3
|
||||
|
||||
EXPOSE 9200
|
||||
EXPOSE 9300
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/database",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"files": [
|
||||
"config",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @openstapps/proxy
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- 93c38b74: dependency updates
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/proxy",
|
||||
"description": "NGINX proxy that is dynamically configured by a Node.js script",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
@@ -43,11 +43,11 @@
|
||||
"dependencies": {
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"@types/config": "3.3.0",
|
||||
"@types/dockerode": "3.3.17",
|
||||
"@types/dockerode": "4.0.2",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/sha1": "1.1.3",
|
||||
"config": "3.3.9",
|
||||
"dockerode": "3.3.5",
|
||||
"dockerode": "5.0.1",
|
||||
"is-cidr": "4.0.2",
|
||||
"mustache": "4.2.0",
|
||||
"semver": "7.6.0",
|
||||
@@ -60,7 +60,7 @@
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@types/chai": "4.3.20",
|
||||
"@types/config": "3.3.0",
|
||||
"@types/dockerode": "3.3.17",
|
||||
"@types/dockerode": "4.0.2",
|
||||
"@types/mocha": "10.0.10",
|
||||
"@types/mustache": "4.2.2",
|
||||
"@types/node": "22.15.31",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/backend-config
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend-config",
|
||||
"description": "Backend Configuration for OpenStApps",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/eslint-config
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/eslint-config",
|
||||
"description": "A collection of configuration base files for StApps projects. Just an (unused) experiment for now.",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.7",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/prettier-config
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/prettier-config",
|
||||
"description": "StApps Prettier Config",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.7",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/prettier-config.git",
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# @openstapps/projectmanagement
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/collection-utils@4.0.7
|
||||
- @openstapps/gitlab-api@4.0.7
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/projectmanagement",
|
||||
"description": "Main documentation and scripts for maintenance.",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/tsconfig
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/tsconfig",
|
||||
"description": "The tsconfig for the openstapps project",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.7",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# @openstapps/minimal-connector
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/core@4.0.7
|
||||
- @openstapps/api@4.0.7
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-connector",
|
||||
"description": "This is a minimal connector which serves as an example",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/minimal-deployment
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-deployment",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"files": [
|
||||
"database",
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @openstapps/minimal-plugin
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/api-plugin@4.0.7
|
||||
- @openstapps/core-tools@4.0.7
|
||||
- @openstapps/core@4.0.7
|
||||
- @openstapps/api@4.0.7
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-plugin",
|
||||
"description": "Minimal Plugin",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @openstapps/app
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- 93c38b74: dependency updates
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/core@4.0.7
|
||||
- @openstapps/api@4.0.7
|
||||
- @openstapps/collection-utils@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/app",
|
||||
"description": "The generic app tailored to fulfill needs of German universities, written using Ionic Framework.",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"license": "GPL-3.0-only",
|
||||
"author": "Karl-Philipp Wulfert <krlwlfrt@gmail.com>",
|
||||
@@ -48,13 +48,13 @@
|
||||
"test:integration": "sh integration-test.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "20.3.31",
|
||||
"@angular/animations": "20.3.33",
|
||||
"@angular/cdk": "20.2.14",
|
||||
"@angular/common": "20.3.31",
|
||||
"@angular/core": "20.3.31",
|
||||
"@angular/forms": "20.3.31",
|
||||
"@angular/platform-browser": "20.3.31",
|
||||
"@angular/router": "20.3.31",
|
||||
"@angular/common": "20.3.33",
|
||||
"@angular/core": "20.3.33",
|
||||
"@angular/forms": "20.3.33",
|
||||
"@angular/platform-browser": "20.3.33",
|
||||
"@angular/router": "20.3.33",
|
||||
"@awesome-cordova-plugins/calendar": "8.1.0",
|
||||
"@awesome-cordova-plugins/core": "8.1.0",
|
||||
"@capacitor-community/in-app-review": "8.0.0",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/app-builder-image
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/app-builder-image",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/app-cypress
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/app-cypress",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/node-base
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/node-base",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/node-builder
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/node-builder",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @openstapps/api-cli
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- 93c38b74: dependency updates
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/core-tools@4.0.7
|
||||
- @openstapps/core@4.0.7
|
||||
- @openstapps/api@4.0.7
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/api-cli",
|
||||
"description": "CLI client for @openstapps/api",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/api.git",
|
||||
@@ -51,7 +51,7 @@
|
||||
"commander": "10.0.0",
|
||||
"fs-extra": "10.1.0",
|
||||
"junit-report-builder": "3.0.1",
|
||||
"wait-on": "6.0.1"
|
||||
"wait-on": "9.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @openstapps/api-plugin
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/core-tools@4.0.7
|
||||
- @openstapps/core@4.0.7
|
||||
- @openstapps/api@4.0.7
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/api-plugin",
|
||||
"description": "Node.js library to interact with the StApps backend service",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/api.git",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @openstapps/api
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- 93c38b74: dependency updates
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- @openstapps/core@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/api",
|
||||
"description": "Node.js library to interact with the StApps backend service",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/api.git",
|
||||
@@ -58,7 +58,7 @@
|
||||
"tsup": "8.5.0",
|
||||
"typedoc": "0.25.12",
|
||||
"typescript": "5.9.3",
|
||||
"undici": "6.21.3"
|
||||
"undici": "6.29.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@openstapps/core": "workspace:*"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/collection-utils
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/collection-utils",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.7",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"main": "lib/index.js",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @openstapps/core-tools
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- 93c38b74: dependency updates
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/easy-ast@4.0.7
|
||||
- @openstapps/collection-utils@4.0.7
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/core-tools",
|
||||
"description": "Tools to convert and validate StAppsCore",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/core-tools.git",
|
||||
@@ -52,19 +52,19 @@
|
||||
"better-ajv-errors": "1.2.0",
|
||||
"commander": "10.0.0",
|
||||
"deepmerge": "4.3.1",
|
||||
"del": "6.1.1",
|
||||
"flatted": "3.2.7",
|
||||
"del": "9.0.1",
|
||||
"flatted": "3.4.4",
|
||||
"fs-extra": "10.1.0",
|
||||
"glob": "10.5.0",
|
||||
"got": "12.6.0",
|
||||
"got": "14.6.6",
|
||||
"humanize-string": "3.0.0",
|
||||
"json-schema": "0.4.0",
|
||||
"mustache": "4.2.0",
|
||||
"openapi-types": "12.1.0",
|
||||
"plantuml-encoder": "1.4.0",
|
||||
"re2": "1.21.0",
|
||||
"re2": "1.27.0",
|
||||
"toposort": "2.0.2",
|
||||
"ts-json-schema-generator": "1.2.0"
|
||||
"ts-json-schema-generator": "1.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @openstapps/core
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/core-tools@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/core",
|
||||
"description": "StAppsCore - Generalized model of data",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/core.git",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @openstapps/easy-ast
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/collection-utils@4.0.7
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/easy-ast",
|
||||
"description": "Tool to easily handle TypeScript AST",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/core-tools.git",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @openstapps/es-mapping-generator
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- 93c38b74: dependency updates
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/es-mapping-generator",
|
||||
"description": "Tool to convert TypeScript Interfaces to Elasticsearch Mappings",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.7",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"author": "Thea Schöbl <dev@theaninova.de>",
|
||||
@@ -26,10 +26,10 @@
|
||||
"test": "c8 mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/elasticsearch": "8.19.2",
|
||||
"@elastic/elasticsearch": "8.14.1",
|
||||
"commander": "10.0.0",
|
||||
"deepmerge": "4.3.1",
|
||||
"flatted": "3.2.7",
|
||||
"flatted": "3.4.4",
|
||||
"typedoc": "0.18.0",
|
||||
"typescript": "3.8.3"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @openstapps/gitlab-api
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- 93c38b74: dependency updates
|
||||
- Updated dependencies [ae1cad3b]
|
||||
- Updated dependencies [93c38b74]
|
||||
- @openstapps/logger@4.0.7
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/gitlab-api",
|
||||
"description": "Wraps common GitLab API calls in a TypeScript class.",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.7",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/gitlab-api.git",
|
||||
@@ -31,7 +31,7 @@
|
||||
"dependencies": {
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"commander": "10.0.0",
|
||||
"got": "12.6.0"
|
||||
"got": "14.6.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @openstapps/logger
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ae1cad3b: upgrade project to Typescript 5.9
|
||||
- 93c38b74: dependency updates
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/logger",
|
||||
"description": "A cli logger with colors, log-levels and the possibility to use a transport system for errors",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.7",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/logger.git",
|
||||
@@ -28,10 +28,9 @@
|
||||
"test": "c8 mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/nodemailer": "8.0.2",
|
||||
"chalk": "5.2.0",
|
||||
"flatted": "3.2.7",
|
||||
"nodemailer": "8.0.11"
|
||||
"flatted": "3.4.4",
|
||||
"nodemailer": "10.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
|
||||
@@ -312,19 +312,19 @@ export class SMTP extends VerifiableTransport {
|
||||
*/
|
||||
public async sendMail(mail: SendMailOptions): Promise<string> {
|
||||
// info is the response of the smtp server
|
||||
let info = await this.transportAgent.sendMail(mail);
|
||||
const info = await this.transportAgent.sendMail(mail);
|
||||
|
||||
// it can be undefined (empty response)
|
||||
if (info === undefined) {
|
||||
info = 'Successfully sent mail';
|
||||
(info['message'] as string) = 'Successfully sent mail';
|
||||
}
|
||||
|
||||
// or not of type string
|
||||
if (typeof info !== 'string') {
|
||||
info = JSON.stringify(info);
|
||||
(info.message as string) = JSON.stringify(info.message);
|
||||
}
|
||||
|
||||
return info;
|
||||
return info.message;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Generated
+3821
-4162
File diff suppressed because it is too large
Load Diff
+3
-4
@@ -21,12 +21,11 @@ onlyBuiltDependencies:
|
||||
- lmdb
|
||||
- msgpackr-extract
|
||||
- nice-napi
|
||||
- protobufjs
|
||||
- re2
|
||||
- sharp
|
||||
- ssh2
|
||||
- swiper
|
||||
|
||||
overrides:
|
||||
handlebars@>=4.0.0 <=4.7.8: '>=4.7.10'
|
||||
tar@<=7.5.18: '>=7.5.19'
|
||||
proxy-addr@>=2.0.0 <=2.0.7: '>=2.0.8'
|
||||
overwites:
|
||||
undici@>=6.0.0 <6.28.1: '>=6.28.1'
|
||||
|
||||
Reference in New Issue
Block a user