fix: rebase cleanup

fix: rebase cleanup

fix: rebase cleanup
This commit is contained in:
2023-05-24 14:53:10 +02:00
parent 0a76427ba8
commit d6d4f6e5c4
40 changed files with 4964 additions and 4493 deletions

View File

@@ -1,5 +1,5 @@
const path = require("path");
const merge = require("deepmerge");
// const merge = require("deepmerge");
const additionalDeps = {
'@openstapps/eslint-config': require('./configuration/eslint-config/package.json'),

View File

@@ -1,18 +1,14 @@
# [1.0.0](https://gitlab.com/openstapps/backend/compare/v0.6.0...v1.0.0) (2023-05-08)
### Bug Fixes
* openapi docs generation ([4ebe44a](https://gitlab.com/openstapps/backend/commit/4ebe44a5a7a1b7bfd0aa5b84d47d4056d3068ffe))
* rename deprecated Gitlab CI variables ([3471591](https://gitlab.com/openstapps/backend/commit/3471591a7d458df70447c8dac91f96f3c83e763c))
* semster boosting ([515a6ee](https://gitlab.com/openstapps/backend/commit/515a6eeea56305a37510d99b9f84a6b118b66f8a))
- openapi docs generation ([4ebe44a](https://gitlab.com/openstapps/backend/commit/4ebe44a5a7a1b7bfd0aa5b84d47d4056d3068ffe))
- rename deprecated Gitlab CI variables ([3471591](https://gitlab.com/openstapps/backend/commit/3471591a7d458df70447c8dac91f96f3c83e763c))
- semster boosting ([515a6ee](https://gitlab.com/openstapps/backend/commit/515a6eeea56305a37510d99b9f84a6b118b66f8a))
### Features
* update to of elasticsearch 8.4 ([c9b83b5](https://gitlab.com/openstapps/backend/commit/c9b83b5d71610f82bd1d99e837e29ad445758aea))
- update to of elasticsearch 8.4 ([c9b83b5](https://gitlab.com/openstapps/backend/commit/c9b83b5d71610f82bd1d99e837e29ad445758aea))
# [0.6.0](https://gitlab.com/openstapps/backend/compare/v0.5.0...v0.6.0) (2023-01-30)

View File

@@ -22,9 +22,10 @@ you with everything you need to run this backend.
# Local usage for development purposes
## Requirements
- Elasticsearch (8.4)
* [ICU analysis plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-icu.html)
* OR Docker
- [ICU analysis plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-icu.html)
- OR Docker
- Node.js (~14) / NPM
### Startup Behaviour

View File

@@ -14,9 +14,9 @@
*/
import {QueryDslQueryContainer} from '@elastic/elasticsearch/lib/api/types';
import {SCConfigFile, SCSearchQuery} from '@openstapps/core';
import {ElasticsearchConfig} from '../types/elasticsearch-config';
import {buildFilter} from './filter';
import {buildScoringFunctions} from './boost/scoring-functions';
import {ElasticsearchConfig} from '../types/elasticsearch-config.js';
import {buildFilter} from './filter.js';
import {buildScoringFunctions} from './boost/scoring-functions.js';
/**
* Builds body for Elasticsearch requests

View File

@@ -14,10 +14,10 @@
*/
import {Sort} from '@elastic/elasticsearch/lib/api/types';
import {SCSearchSort} from '@openstapps/core';
import {buildDistanceSort} from './sort/distance';
import {buildDucetSort} from './sort/ducet';
import {buildGenericSort} from './sort/generic';
import {buildPriceSort} from './sort/price';
import {buildDistanceSort} from './sort/distance.js';
import {buildDucetSort} from './sort/ducet.js';
import {buildGenericSort} from './sort/generic.js';
import {buildPriceSort} from './sort/price.js';
/**
* converts query to
@@ -28,14 +28,18 @@ import {buildPriceSort} from './sort/price';
export function buildSort(sorts: SCSearchSort[]): Sort {
return sorts.map(sort => {
switch (sort.type) {
case 'generic':
case 'generic': {
return buildGenericSort(sort);
case 'ducet':
}
case 'ducet': {
return buildDucetSort(sort);
case 'distance':
}
case 'distance': {
return buildDistanceSort(sort);
case 'price':
}
case 'price': {
return buildPriceSort(sort);
}
}
});
}

View File

@@ -13,17 +13,6 @@
~ this program. If not, see <https://www.gnu.org/licenses/>.
-->
<<<<<<<< HEAD:frontend/app/src/app/modules/data/list/data-list-item-host-default.html
<h2>
{{ 'name' | thingTranslate: item }}
</h2>
<p *ngIf="item.description">
<stapps-long-inline-text
[text]="'description' | thingTranslate: item"
[size]="80"
></stapps-long-inline-text>
</p>
========
<stapps-section title="{{ 'dashboard.navigation.item.search' | translate }}">
<ion-searchbar
[routerLink]="['/search']"
@@ -33,4 +22,3 @@
<ion-ripple-effect></ion-ripple-effect>
</ion-searchbar>
</stapps-section>
>>>>>>>> app/develop:frontend/app/src/app/modules/dashboard/sections/search-section/search-section.component.html

View File

@@ -24,11 +24,11 @@
<ion-list inset="true" lines="full">
<ion-item lines="none" (click)="modified.emit(); frequency.click()" class="list-header">
<ion-list-header>
<ion-label>{{
frequency.children[0].item.repeatFrequency
? (frequency.children[0].item.repeatFrequency | durationLocalized: true | sentencecase)
: ('data.chips.add_events.popover.SINGLE' | translate | titlecase)
}}</ion-label>
<ion-label
>{{ frequency.children[0].item.repeatFrequency ? (frequency.children[0].item.repeatFrequency |
durationLocalized: true | sentencecase) : ('data.chips.add_events.popover.SINGLE' | translate |
titlecase) }}</ion-label
>
<ion-button></ion-button>
</ion-list-header>
<ion-checkbox slot="end" [checked]="frequency.checked" [indeterminate]="frequency.indeterminate">
@@ -41,19 +41,18 @@
<ion-label>
<ng-container *ngIf="date.item.dates.length > 1; else single_event">
<ion-text>
{{ date.item.dates[0] | amDateFormat: 'dddd, LT' }} -
{{ date.item.dates[0] | amAdd: date.item.duration | amDateFormat: 'LT' }}
{{ date.item.dates[0] | amDateFormat: 'dddd, LT' }} - {{ date.item.dates[0] | amAdd:
date.item.duration | amDateFormat: 'LT' }}
</ion-text>
<br />
<ion-text>
{{ date.item.dates[0] | amDateFormat: 'LL' }} -
{{ date.item.dates[date.item.dates.length - 1] | amDateFormat: 'LL' }}
{{ date.item.dates[0] | amDateFormat: 'LL' }} - {{ date.item.dates[date.item.dates.length - 1] |
amDateFormat: 'LL' }}
</ion-text>
</ng-container>
<ng-template #single_event>
<ion-text *ngIf="date.item.dates[0] as time; else noDates">
{{ time | amDateFormat: 'LL, LT' }} -
{{ time | amAdd: date.item.duration | amDateFormat: 'LT' }}
{{ time | amDateFormat: 'LL, LT' }} - {{ time | amAdd: date.item.duration | amDateFormat: 'LT' }}
</ion-text>
<ng-template #noDates>
<ion-text color="danger">{{ 'data.chips.add_events.popover.DATA_ERROR' | translate }}</ion-text>

View File

@@ -12,7 +12,6 @@
* 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 {SCThingType} from '@openstapps/core';
import {SCIcon} from '../../util/ion-icon/icon';
@@ -22,6 +21,7 @@ export const DataIcons: Record<SCThingType, string> = {
'article': SCIcon`article`,
'book': SCIcon`book`,
'building': SCIcon`location_city`,
'certification': SCIcon`fact_check`,
'catalog': SCIcon`inventory_2`,
'contact point': SCIcon`contact_page`,
'course of study': SCIcon`school`,

View File

@@ -13,17 +13,6 @@
~ this program. If not, see <https://www.gnu.org/licenses/>.
-->
<<<<<<<< HEAD:frontend/app/src/app/modules/dashboard/sections/search-section/search-section.component.html
<stapps-section title="{{ 'dashboard.navigation.item.search' | translate }}">
<ion-searchbar
[routerLink]="'/search'"
[routerAnimation]="routeTransition"
class="stapps-searchbar ion-activatable ripple-parent"
>
<ion-ripple-effect></ion-ripple-effect>
</ion-searchbar>
</stapps-section>
========
<ion-button (click)="toggle($event)" color="medium" size="small" fill="clear">
<ion-icon
slot="icon-only"
@@ -32,4 +21,3 @@
name="grade"
></ion-icon>
</ion-button>
>>>>>>>> app/develop:frontend/app/src/app/modules/data/elements/favorite-button.component.html

View File

@@ -15,17 +15,14 @@
<div>
<ion-text *ngIf="price && !soldOut" style="white-space: nowrap">
<h2>
{{ price | currency : 'EUR' : 'symbol' : undefined : 'de' }}
</h2>
<h2>{{ price | currency : 'EUR' : 'symbol' : undefined : 'de' }}</h2>
</ion-text>
<ion-text *ngIf="soldOut" color="danger" class="sold-out" style="white-space: nowrap">
<h2>
{{ 'data.detail.offers.sold_out' | translate }}
</h2>
<h2>{{ 'data.detail.offers.sold_out' | translate }}</h2>
</ion-text>
<p *ngIf="_offers[0].inPlace && !soldOut" class="place" style="white-space: nowrap">
<ion-icon name="pin_drop"></ion-icon>{{ _offers[0].inPlace.name
}}<span *ngIf="_offers.length > 1">...</span>
<ion-icon name="pin_drop"></ion-icon>{{ _offers[0].inPlace.name }}<span *ngIf="_offers.length > 1"
>...</span
>
</p>
</div>

View File

@@ -12,20 +12,6 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
<<<<<<<< HEAD:frontend/app/src/app/util/simple-swiper.component.ts
import {Component, ContentChildren, ElementRef, ViewContainerRef} from '@angular/core';
@Component({
selector: 'simple-swiper',
templateUrl: 'simple-swiper.html',
styleUrls: ['simple-swiper.scss'],
})
export class SimpleSwiperComponent {
constructor(readonly viewContainerRef: ViewContainerRef) {}
@ContentChildren('*') children: ElementRef<unknown>;
========
import {Component, Input} from '@angular/core';
import {SCThings} from '@openstapps/core';
@@ -35,5 +21,4 @@ import {SCThings} from '@openstapps/core';
})
export class DataListItemHostDefaultComponent {
@Input() item: SCThings;
>>>>>>>> app/develop:frontend/app/src/app/modules/data/list/data-list-item-host-default.component.ts
}

View File

@@ -60,9 +60,7 @@
[class.no-results]="!showDefaultData && !items && !loading"
[style.display]="!showDefaultData && !items && !loading ? 'block' : 'none'"
>
<ion-label class="centeredMessageContainer">
{{ searchInstruction | translate }}
</ion-label>
<ion-label class="centeredMessageContainer"> {{ searchInstruction | translate }} </ion-label>
</div>
<stapps-data-list
id="data-list"

View File

@@ -13,21 +13,11 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Component, Input} from '@angular/core';
import {SCThings} from '@openstapps/core';
import {Component} from '@angular/core';
@Component({
<<<<<<<< HEAD:frontend/app/src/app/modules/data/list/data-list-item-host-default.component.ts
selector: 'data-list-item-host-default',
templateUrl: 'data-list-item-host-default.html',
})
export class DataListItemHostDefaultComponent {
@Input() item: SCThings;
}
========
selector: 'skeleton-list',
templateUrl: 'skeleton-list.html',
styleUrls: ['skeleton-list.scss'],
})
export class SkeletonListComponent {}
>>>>>>>> app/develop:frontend/app/src/app/modules/data/list/skeleton-list.component.ts

View File

@@ -22,7 +22,5 @@
></abbr>
</ng-container>
</ng-container>
<ion-label>
{{ 'categories' | thingTranslate: item | join: ', ' | titlecase }}
</ion-label>
<ion-label> {{ 'categories' | thingTranslate: item | join: ', ' | titlecase }} </ion-label>
</ion-note>

View File

@@ -18,9 +18,7 @@
<ion-col size="11" size-sm="10">
<div class="ion-text-wrap">
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
<p class="title-sub ion-hide-sm-down">
{{ 'description' | thingTranslate: item }}
</p>
<p class="title-sub ion-hide-sm-down">{{ 'description' | thingTranslate: item }}</p>
<stapps-dish-characteristics [item]="item"></stapps-dish-characteristics>
</div>
</ion-col>

View File

@@ -18,9 +18,7 @@
<ion-col>
<div class="ion-text-wrap">
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
<p *ngIf="item.description" class="title-sub">
{{ 'description' | thingTranslate: item }}
</p>
<p *ngIf="item.description" class="title-sub">{{ 'description' | thingTranslate: item }}</p>
<p *ngIf="item.academicTerms" class="title-sub">
{{ 'name' | thingTranslate: item.academicTerms[0] }}
</p>
@@ -34,12 +32,8 @@
<ion-row *ngIf="item.type === 'sport course'">
<ion-col>
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
<p *ngIf="item.description" class="title-sub">
{{ 'description' | thingTranslate: item }}
</p>
<p *ngIf="item.academicTerms" class="title-sub">
{{ 'name' | thingTranslate: item.academicTerms[0] }}
</p>
<p *ngIf="item.description" class="title-sub">{{ 'description' | thingTranslate: item }}</p>
<p *ngIf="item.academicTerms" class="title-sub">{{ 'name' | thingTranslate: item.academicTerms[0] }}</p>
<ion-note>{{ 'type' | thingTranslate: item }}</ion-note>
</ion-col>
</ion-row>

View File

@@ -31,9 +31,7 @@
</ng-container>
<ng-container *ngIf="item.type !== 'building'">
<ion-card *ngIf="item.inPlace">
<ion-card-header>
{{ 'inPlace' | propertyNameTranslate: item | titlecase }}
</ion-card-header>
<ion-card-header> {{ 'inPlace' | propertyNameTranslate: item | titlecase }} </ion-card-header>
<ion-card-content>
<stapps-data-list-item [item]="item.inPlace"></stapps-data-list-item>
</ion-card-content>

View File

@@ -26,9 +26,7 @@
</p>
<p>
<ion-note *ngIf="item.categories && item.type !== 'building'; else onlyType">
<ion-label>
{{ 'categories' | thingTranslate: item | join: ', ' | titlecase }}
</ion-label>
<ion-label> {{ 'categories' | thingTranslate: item | join: ', ' | titlecase }} </ion-label>
<ion-label *ngIf="distance" class="distance">
<ion-icon name="directions_walk"></ion-icon>
{{ distance | metersLocalized }}
@@ -37,9 +35,7 @@
</p>
<ng-template #onlyType>
<ion-note>
<ion-label>
{{ 'type' | thingTranslate: item | titlecase }}
</ion-label>
<ion-label> {{ 'type' | thingTranslate: item | titlecase }} </ion-label>
<ion-label *ngIf="distance" class="distance">
<ion-icon name="directions_walk"></ion-icon>
{{ distance | metersLocalized }}
@@ -47,9 +43,7 @@
</ion-note>
</ng-template>
</ng-container>
<p *ngIf="item.description">
{{ 'description' | thingTranslate: item }}
</p>
<p *ngIf="item.description">{{ 'description' | thingTranslate: item }}</p>
</div>
</ion-col>
<ng-container *ngIf="item.type !== 'building'">

View File

@@ -42,12 +42,12 @@
interface="popover"
required="true"
>
<ion-select-option value="Comment">{{
'feedback.form.type.values.comment' | translate
}}</ion-select-option>
<ion-select-option value="Bug">{{
'feedback.form.type.values.bug' | translate
}}</ion-select-option>
<ion-select-option value="Comment"
>{{ 'feedback.form.type.values.comment' | translate }}</ion-select-option
>
<ion-select-option value="Bug"
>{{ 'feedback.form.type.values.bug' | translate }}</ion-select-option
>
</ion-select>
</ion-item>
<ion-item>
@@ -85,9 +85,9 @@
</ion-item>
<ion-item lines="none">
<ion-label
><a style="display: contents" [routerLink]="['/about/privacy']">{{
'feedback.form.termsAgree.1' | translate
}}</a></ion-label
><a style="display: contents" [routerLink]="['/about/privacy']"
>{{ 'feedback.form.termsAgree.1' | translate }}</a
></ion-label
>
</ion-item>
<ion-item>
@@ -102,9 +102,9 @@
<ion-card>
<ion-card-title>
<ion-button expand="block" fill="clear" (click)="toggleShowMetaData()">
<ng-container *ngIf="!showMetaData; else hide">{{
'feedback.form.protocolData.show' | translate
}}</ng-container>
<ng-container *ngIf="!showMetaData; else hide"
>{{ 'feedback.form.protocolData.show' | translate }}</ng-container
>
<ng-template #hide>{{ 'feedback.form.protocolData.hide' | translate }}</ng-template>
</ion-button>
</ion-card-title>

View File

@@ -16,9 +16,7 @@
<ion-menu type="overlay" menuId="context" contentId="{{ contentId }}" maxEdgeStart="0" side="end">
<ion-toolbar color="primary" mode="ios">
<ion-label class="ion-padding-horizontal">
<h1 class="ion-padding-horizontal">
{{ 'menu.context.title' | translate | titlecase }}
</h1>
<h1 class="ion-padding-horizontal">{{ 'menu.context.title' | translate | titlecase }}</h1>
</ion-label>
</ion-toolbar>
<ion-content>
@@ -59,9 +57,7 @@
<div>
<ion-list-header class="h3">
<ion-label>
<span *ngIf="facet.info.onlyOnType"
><b>{{ facet.info.onlyOnType | titlecase }}</b> /
</span>
<span *ngIf="facet.info.onlyOnType"><b>{{ facet.info.onlyOnType | titlecase }}</b> / </span>
{{ facet.info.field | titlecase }}
</ion-label>
</ion-list-header>
@@ -74,12 +70,9 @@
"
>
<ion-label class="filter-item-label">
({{ bucket.count }})
{{
facet.field === 'type'
? (getTranslatedPropertyValue($any(bucket.key), 'type') | titlecase)
: (getTranslatedPropertyValue(facet.onlyOnType, facet.field, bucket.key) | titlecase)
}}
({{ bucket.count }}) {{ facet.field === 'type' ? (getTranslatedPropertyValue($any(bucket.key),
'type') | titlecase) : (getTranslatedPropertyValue(facet.onlyOnType, facet.field, bucket.key)
| titlecase) }}
</ion-label>
<ion-checkbox
[(ngModel)]="bucket.checked"

View File

@@ -42,38 +42,24 @@
class="main-info"
>
<ng-container *ngIf="user$ | async as userInfo">
<ion-text class="full-name">
{{ userInfo?.name }}
</ion-text>
<ion-text class="full-name"> {{ userInfo?.name }} </ion-text>
<div class="matriculation-number">
<ion-label>
{{ 'profile.userInfo.studentId' | translate | uppercase }}
</ion-label>
<ion-text>
{{ userInfo?.studentId }}
</ion-text>
<ion-label> {{ 'profile.userInfo.studentId' | translate | uppercase }} </ion-label>
<ion-text> {{ userInfo?.studentId }} </ion-text>
</div>
<div class="user-name">
<ion-label>
{{ 'profile.userInfo.username' | translate | uppercase }}
</ion-label>
<ion-label> {{ 'profile.userInfo.username' | translate | uppercase }} </ion-label>
<ion-text>{{ userInfo?.id }}</ion-text>
</div>
<div class="email">
<ion-label>
{{ 'profile.userInfo.email' | translate | uppercase }}
</ion-label>
<ion-text>
{{ userInfo?.email }}
</ion-text>
<ion-label> {{ 'profile.userInfo.email' | translate | uppercase }} </ion-label>
<ion-text> {{ userInfo?.email }} </ion-text>
</div>
</ng-container>
</ion-col>
<ng-template #logInPrompt>
<ion-col size="9">
<ion-text class="log-in-prompt">
{{ 'profile.userInfo.logInPrompt' | translate }}
</ion-text>
<ion-text class="log-in-prompt"> {{ 'profile.userInfo.logInPrompt' | translate }} </ion-text>
</ion-col>
</ng-template>
</ion-row>
@@ -86,9 +72,7 @@
[item]="section"
></stapps-profile-page-section>
<section class="courses">
<ion-label class="section-headline">
{{ 'profile.titleCourses' | translate | uppercase }}
</ion-label>
<ion-label class="section-headline"> {{ 'profile.titleCourses' | translate | uppercase }} </ion-label>
<ion-card class="courses-card">
<ion-card-header (click)="toggleCourseCardState()">
<span>{{ 'profile.courses.today' | translate | uppercase }}</span>
@@ -96,17 +80,13 @@
</ion-card-header>
<ion-card-content class="course-card" [class.show-card]="courseCardState === courseCardEnum.expanded">
<ng-container *ngIf="myCoursesToday.length === 0">
<div class="no-course">
{{ 'profile.courses.no_courses' | translate }}
</div>
<div class="no-course">{{ 'profile.courses.no_courses' | translate }}</div>
</ng-container>
<ng-container *ngFor="let myCourse of myCoursesToday">
<div class="clickable" [routerLink]="['/data-detail', myCourse.course.event.uid]">
<div>{{ myCourse?.startTime }} - {{ myCourse?.endTime }}</div>
<div>{{ myCourse?.course.event?.originalCategory }}</div>
<div [class.last]="!myCourse?.course.inPlace?.name">
{{ myCourse.course?.event?.name }}
</div>
<div [class.last]="!myCourse?.course.inPlace?.name">{{ myCourse.course?.event?.name }}</div>
<div *ngIf="myCourse.course?.inPlace?.name" [class.last]="myCourse.course?.inPlace?.name">
{{ myCourse.course?.inPlace.name }}
</div>

View File

@@ -12,23 +12,6 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
<<<<<<<< HEAD:frontend/app/src/app/modules/data/list/data-list.scss
cdk-virtual-scroll-viewport {
height: 100%;
width: 100%;
}
::ng-deep {
.cdk-virtual-scroll-content-wrapper {
width: 100%;
}
}
.virtual-scroll-expander {
clear: both;
}
========
import {ChangeDetectionStrategy, Component} from '@angular/core';
@Component({
@@ -38,4 +21,3 @@ import {ChangeDetectionStrategy, Component} from '@angular/core';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SimpleSwiperComponent {}
>>>>>>>> app/develop:frontend/app/src/app/util/simple-swiper.component.ts

View File

@@ -1,25 +1,16 @@
# [1.1.0](https://gitlab.com/openstapps/api/compare/v1.0.1...v1.1.0) (2023-05-19)
## [1.0.1](https://gitlab.com/openstapps/api/compare/v1.0.0...v1.0.1) (2023-05-08)
### Bug Fixes
* changelog generation on version tags ([a5291af](https://gitlab.com/openstapps/api/commit/a5291af83831d542a60d8df119dc10fc44233ae6))
* rename deprecated Gitlab CI variables ([10f7cb8](https://gitlab.com/openstapps/api/commit/10f7cb802883b51fcee52b05d2751cbac27130cd))
- changelog generation on version tags ([a5291af](https://gitlab.com/openstapps/api/commit/a5291af83831d542a60d8df119dc10fc44233ae6))
- rename deprecated Gitlab CI variables ([10f7cb8](https://gitlab.com/openstapps/api/commit/10f7cb802883b51fcee52b05d2751cbac27130cd))
# [1.0.0](https://gitlab.com/openstapps/api/compare/v0.46.0...v1.0.0) (2023-05-04)
# [0.46.0](https://gitlab.com/openstapps/api/compare/v0.45.0...v0.46.0) (2023-05-04)
# [0.45.0](https://gitlab.com/openstapps/api/compare/v0.44.0...v0.45.0) (2022-12-06)
# [0.44.0](https://gitlab.com/openstapps/api/compare/v0.43.0...v0.44.0) (2022-10-18)

0
packages/api/app.js Normal file → Executable file
View File

0
packages/core-tools/app.js Normal file → Executable file
View File

View File

@@ -1,24 +1,16 @@
# [1.1.0](https://gitlab.com/openstapps/core/compare/v1.0.1...v1.1.0) (2023-05-19)
### Features
* add certification thing ([fd63fb7](https://gitlab.com/openstapps/core/commit/fd63fb764f882a87b8da3c5fb27701a090469df2))
- add certification thing ([fd63fb7](https://gitlab.com/openstapps/core/commit/fd63fb764f882a87b8da3c5fb27701a090469df2))
## [1.0.1](https://gitlab.com/openstapps/core/compare/v1.0.0...v1.0.1) (2023-04-28)
# [1.0.0](https://gitlab.com/openstapps/core/compare/v0.75.0...v1.0.0) (2023-04-28)
### Features
* support ES 8.4 via mapping generator ([afcc73f](https://gitlab.com/openstapps/core/commit/afcc73f3da856a76a613d939a759cf1cd701a2c5))
- support ES 8.4 via mapping generator ([afcc73f](https://gitlab.com/openstapps/core/commit/afcc73f3da856a76a613d939a759cf1cd701a2c5))
# [0.75.0](https://gitlab.com/openstapps/core/compare/v0.74.0...v0.75.0) (2023-02-28)

View File

@@ -23,7 +23,11 @@ import {SCAssessment, SCAssessmentMeta, SCAssessmentWithoutReferences} from './t
import {SCBook, SCBookMeta, SCBookWithoutReferences} from './things/book.js';
import {SCBuilding, SCBuildingMeta, SCBuildingWithoutReferences} from './things/building.js';
import {SCCatalog, SCCatalogMeta, SCCatalogWithoutReferences} from './things/catalog.js';
import {SCCertification, SCCertificationMeta, SCCertificationWithoutReferences} from './things/certification';
import {
SCCertification,
SCCertificationMeta,
SCCertificationWithoutReferences,
} from './things/certification.js';
import {SCContactPoint, SCContactPointMeta, SCContactPointWithoutReferences} from './things/contact-point.js';
import {
SCCourseOfStudy,

View File

@@ -12,16 +12,16 @@
* 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 {SCMetaTranslations, SCTranslations} from '../general/i18n';
import {SCThing, SCThingMeta, SCThingType} from './abstract/thing';
import {SCMetaTranslations, SCTranslations} from '../general/i18n.js';
import {SCThing, SCThingMeta, SCThingType} from './abstract/thing.js';
import {
SCThingWithCategories,
SCThingWithCategoriesSpecificValues,
SCThingWithCategoriesTranslatableProperties,
SCThingWithCategoriesWithoutReferences,
SCThingWithCategoriesWithoutReferencesMeta,
} from './abstract/thing-with-categories';
import {SCOrganizationWithoutReferences} from './organization';
} from './abstract/thing-with-categories.js';
import {SCOrganizationWithoutReferences} from './organization.js';
export interface SCCertificationWithoutReferences
extends SCThingWithCategoriesWithoutReferences<

View File

@@ -13,7 +13,6 @@
* 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 {SCMultiSearchResponse} from '../src/index.js';
import {expect} from 'chai';
import {
isBulkResponse,
@@ -26,11 +25,7 @@ import {bulkResponse} from './dummy/bulk-response.js';
import {dishWithTranslation} from './dummy/dish-with-translation.js';
import {dishWithTranslationSearchResponse} from './dummy/dish-with-translation-search-response.js';
import {notADish} from './dummy/not-a-dish.js';
import {SCBulkResponse} from '../src/protocol/routes/bulk-request.js';
import {SCSearchResponse} from '../src/protocol/routes/search.js';
import {SCMultiSearchResponse} from '../src/protocol/routes/search-multi.js';
import {SCThingOriginType, SCThingType} from '../src/things/abstract/thing.js';
import {SCDish} from '../src/things/dish.js';
import {SCMultiSearchResponse} from '../src/index.js';
describe('Guards', function () {
this.timeout(10_000);

View File

@@ -12,7 +12,6 @@
* 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 {slow, suite, test, timeout} from '@testdeck/mocha';
import {expect} from 'chai';
import {SCBulkRoute} from '../src/index.js';
import {SCBulkAddRoute} from '../src/index.js';

View File

@@ -12,7 +12,6 @@
* 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 {slow, suite, test, timeout} from '@testdeck/mocha';
import {expect} from 'chai';
import clone from 'rfdc';
import {SCThingRemoteOrigin} from '../src/index.js';

View File

@@ -1,11 +1,7 @@
# [0.6.0](https://gitlab.com/openstapps/es-mapping-generator/compare/v0.5.0...v0.6.0) (2023-04-28)
# [0.5.0](https://gitlab.com/openstapps/es-mapping-generator/compare/v0.4.0...v0.5.0) (2023-04-27)
# [0.4.0](https://gitlab.com/openstapps/es-mapping-generator/compare/v0.3.0...v0.4.0) (2023-01-12)
# [0.3.0](https://gitlab.com/openstapps/es-mapping-generator/compare/v0.2.0...v0.3.0) (2022-08-17)

0
packages/es-mapping-generator/app.js Normal file → Executable file
View File

View File

@@ -10,7 +10,6 @@
"bin": {
"openstapps-es-mapping-generator": "app.js"
},
"author": "Thea Schöbl <dev@theaninova.de>",
"scripts": {
"build": "rimraf lib && tsc",
"format": "prettier . --ignore-path ../../.gitignore",
@@ -41,7 +40,7 @@
"c8": "7.13.0",
"nock": "13.3.0",
"rimraf": "5.0.0",
"ts-node": "10.9.1",
"ts-node": "10.9.1"
},
"prettier": "@openstapps/prettier-config"
}

View File

@@ -77,7 +77,7 @@ commander
}
if (typeof options.errorPath !== 'undefined') {
const errorPath = path.resolve(options.errorPath);
mkdirSync(path.dirname(errPath), {recursive: true});
mkdirSync(path.dirname(errorPath), {recursive: true});
// tslint:disable-next-line:no-magic-numbers
writeFileSync(errorPath, JSON.stringify(result.errors, null, 2));
console.log(`Mapping errors written to ${errorPath}.`);

View File

@@ -17,7 +17,6 @@ import {
MappingObjectProperty,
MappingProperty,
} from '@elastic/elasticsearch/lib/api/types';
import {Logger} from '@openstapps/logger';
import merge from 'deepmerge';
import {stringify} from 'flatted';
import {DeclarationReflection, ProjectReflection, SignatureReflection} from 'typedoc';
@@ -38,8 +37,7 @@ import {premaps} from './config/premap';
import {settings} from './config/settings';
import {dynamicTypes, isTagType, MISSING_PREMAP, PARSE_ERROR, TYPE_CONFLICT, typemap} from './config/typemap';
import {AggregationSchema, ESNestedAggregation} from './types/aggregation';
import {ElasticsearchTemplateCollection,
MappingGenTemplate} from './types/mapping';
import {ElasticsearchTemplateCollection, MappingGenTemplate} from './types/mapping';
import * as console from 'console';
let dynamicTemplates: Record<string, MappingDynamicTemplate>[] = [];
@@ -260,11 +258,7 @@ function handleDeclarationReflection(
// check if we have an object referencing a generic
if (generics.has(decl.name)) {
// if the object name is the same as the generic name
return readFieldTags(
generics.get(decl.name)!,
path,
topTypeName, decl.comment?.tags ?? [],
);
return readFieldTags(generics.get(decl.name)!, path, topTypeName, decl.comment?.tags ?? []);
// use the value defined by the generic
}
@@ -687,12 +681,7 @@ function readFieldTags(
* @param topTypeName the name of the SCThingType
* @param tags tags attached to the value
*/
function readTypeTags(
type: string,
path: string,
topTypeName: string,
tags: CommentTag[],
): MappingProperty {
function readTypeTags(type: string, path: string, topTypeName: string, tags: CommentTag[]): MappingProperty {
let out: MappingProperty = {type: PARSE_ERROR};
if (typeof typemap[type] !== 'undefined') {

0
packages/gitlab-api/app.js Normal file → Executable file
View File

9112
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff