Compare commits

..

12 Commits

Author SHA1 Message Date
Rainer Killinger
f2e1a6ddd5 docs: update changelogs for release
ci: publish release
2024-08-02 10:19:44 +02:00
Rainer Killinger
ccacfbf710 fix: publish-packages script 2024-08-02 10:18:57 +02:00
Rainer Killinger
b249b329f7 refactor: use development backend for non production environment 2024-08-01 17:44:21 +02:00
Jovan Krunić
7afc24f1bc fix: use major version config from storage when offline
Closes #218
2024-08-01 17:44:20 +02:00
Rainer Killinger
7276525dfa fix: app-builder image build due to nodejs versions <18.19 not being supported by angular 17 2024-08-01 15:24:59 +02:00
Jovan Krunić
c9e881582f refactor: set production version of the backend 2024-07-19 15:20:06 +02:00
Jovan Krunić
df681de083 feat: show title if available on library account profile
Closes #215
2024-07-19 15:20:06 +02:00
802a7a3fa7 fix: docs generation 2024-07-19 15:20:06 +02:00
Jovan Krunić
343d03e647 feat: library account adjustments
Closes #214
2024-07-19 15:20:06 +02:00
727b92911e fix: list item layout broken 2024-07-19 15:20:06 +02:00
11bc987807 fix: elasticsearch integration spams errors 2024-07-19 15:20:06 +02:00
Rainer Killinger
b8faae5988 docs: update changelogs for release
ci: publish release
2024-06-28 17:39:39 +02:00
89 changed files with 383 additions and 592 deletions

View File

@@ -1,5 +0,0 @@
---
"@openstapps/easy-ast": patch
---
Fixed docs generation

View File

@@ -1,5 +0,0 @@
---
"@openstapps/backend": patch
---
fix for geo.point mapping

View File

@@ -1,5 +1,18 @@
# @openstapps/backend
## 3.3.2
### Patch Changes
- @openstapps/core@3.3.2
- @openstapps/core-tools@3.3.2
## 3.3.1
### Patch Changes
- 67ab1fd6: fix for geo.point mapping
## 3.3.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/backend",
"description": "A reference implementation for a StApps backend",
"version": "3.3.0",
"version": "3.3.2",
"private": true,
"type": "module",
"license": "AGPL-3.0-only",

View File

@@ -1,31 +1,27 @@
{
"compilerOptions": {
"allowJs": true,
"allowUnreachableCode": false,
"checkJs": true,
"alwaysStrict": true,
"declaration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"explainFiles": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"downlevelIteration": true,
"inlineSourceMap": true,
"isolatedModules": true,
"lib": [
"ES2022",
"DOM"
],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noErrorTruncation": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"isolatedModules": true,
"allowJs": true,
"checkJs": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"outDir": "../../../lib/",
"lib": [
"ES2022",
"DOM"
@@ -37,6 +33,7 @@
"transpileOnly": true
},
"exclude": [
"../../../lib/"
"../../../app.js",
"../../../lib/"
]
}

View File

@@ -1,5 +1,12 @@
# @openstapps/minimal-connector
## 3.3.2
### Patch Changes
- @openstapps/core@3.3.2
- @openstapps/api@3.3.2
## 3.3.0
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/minimal-connector",
"description": "This is a minimal connector which serves as an example",
"version": "3.3.0",
"version": "3.3.2",
"private": true,
"type": "module",
"license": "GPL-3.0-only",

View File

@@ -1,5 +1,14 @@
# @openstapps/minimal-plugin
## 3.3.2
### Patch Changes
- @openstapps/core@3.3.2
- @openstapps/core-tools@3.3.2
- @openstapps/api-plugin@3.3.2
- @openstapps/api@3.3.2
## 3.3.0
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/minimal-plugin",
"description": "Minimal Plugin",
"version": "3.3.0",
"version": "3.3.2",
"private": true,
"type": "module",
"license": "GPL-3.0-only",

View File

@@ -48,16 +48,16 @@ const program = new Command()
const options = program.opts();
// create an instance of the PluginClient
const pluginClient = new PluginClient(new HttpClient(), options['backendUrl']);
const pluginClient = new PluginClient(new HttpClient(), options.backendUrl);
// create an instance of your plugin
const plugin = new MinimalPlugin(
// tslint:disable-next-line:no-magic-numbers
Number.parseInt(options['port'], 10),
options['pluginName'],
options['url'],
`/${options['routeName']}`,
options['backendUrl'],
Number.parseInt(options.port, 10),
options.pluginName,
options.url,
`/${options.routeName}`,
options.backendUrl,
new Converter(path.resolve(__dirname, '..', 'src', 'plugin', 'protocol')), // an instance of the converter. Required
// because your requests and response schemas are defined in the plugin. The path should lead to your request and
// response interfaces
@@ -69,7 +69,7 @@ const plugin = new MinimalPlugin(
pluginClient
.registerPlugin(plugin)
.then(() => {
Logger.ok(`Successfully registered plugin '${options['pluginName']}' on /${options['routeName']} .`);
Logger.ok(`Successfully registered plugin '${options.pluginName}' on /${options.routeName} .`);
})
// eslint-disable-next-line unicorn/prefer-top-level-await
.catch((error: Error) => {
@@ -81,9 +81,7 @@ for (const signal of [`exit`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGTERM`]) {
pluginClient
.unregisterPlugin(plugin)
.then(() => {
Logger.ok(
`Successfully unregistered plugin '${options['pluginName']}' from /${options['routeName']} .`,
);
Logger.ok(`Successfully unregistered plugin '${options.pluginName}' from /${options.routeName} .`);
})
.catch((error: Error) => {
throw error;

View File

@@ -1,5 +1,13 @@
# @openstapps/app
## 3.3.2
### Patch Changes
- 7afc24f1: fixed config version comparison
- @openstapps/core@3.3.2
- @openstapps/api@3.3.2
## 3.3.0
### Minor Changes

View File

@@ -12,9 +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/>.
*/
/**
* @type {import('./scripts/icon-config').IconConfig}
*/
/** @type {import('./scripts/icon-config').IconConfig} */
const config = {
inputPath: 'node_modules/material-symbols/material-symbols-rounded.woff2',
outputPath: 'src/assets/icons.min.woff2',

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/app",
"description": "The generic app tailored to fulfill needs of German universities, written using Ionic Framework.",
"version": "3.3.0",
"version": "3.3.2",
"private": true,
"license": "GPL-3.0-only",
"author": "Karl-Philipp Wulfert <krlwlfrt@gmail.com>",

View File

@@ -132,6 +132,8 @@ describe('ConfigProvider', () => {
wrongConfig.backend.SCVersion = '0.1.0';
storageProviderSpy.get.and.returnValue(Promise.resolve(wrongConfig));
spyOn(configProvider.client, 'handshake').and.returnValue(Promise.resolve(sampleIndexResponse));
// sets StApps core version which has a different major version
configProvider.scVersion = '1.0.0';
await configProvider.init();
expect(ngxLogger.warn).toHaveBeenCalledWith(
@@ -139,6 +141,19 @@ describe('ConfigProvider', () => {
);
});
it('should load from storage if offline and same major version stored', async () => {
internetConnectionServiceMock = {offline$: new BehaviorSubject<boolean>(true)};
storageProviderSpy.has.and.returnValue(Promise.resolve(true));
const configInStorage = structuredClone(sampleIndexResponse);
configInStorage.backend.SCVersion = '1.0.0';
storageProviderSpy.get.and.returnValue(Promise.resolve(configInStorage));
// sets StApps core version which has the same major version
configProvider.scVersion = '1.1.1';
await configProvider.init();
expect(configProvider.getAnyValue('app')).toEqual(configInStorage.app);
});
it('should throw error on saved app configuration not available', async () => {
storageProviderSpy.has.and.returnValue(Promise.resolve(false));
// eslint-disable-next-line unicorn/error-message

View File

@@ -132,7 +132,7 @@ export class ConfigProvider {
this.config = await this.loadLocal();
this.firstSession = false;
this.logger.log(`initialised configuration from storage`);
if (this.config.backend.SCVersion !== this.scVersion) {
if (this.config.backend.SCVersion.split('.')[0] !== this.scVersion.split('.')[0]) {
loadError = new WrongConfigVersionInStorage(this.scVersion, this.config.backend.SCVersion);
}
} catch (error) {

View File

@@ -25,8 +25,6 @@ import {PAIAPatron} from '../../types';
export class ProfilePageComponent {
patron?: PAIAPatron;
propertiesToShow: (keyof PAIAPatron)[] = ['id', 'name', 'email', 'address', 'expires'];
constructor(private readonly libraryAccountService: LibraryAccountService) {}
async ionViewWillEnter(): Promise<void> {

View File

@@ -26,27 +26,45 @@
<ion-card>
<ion-card-content>
<ion-grid>
@for (property of propertiesToShow; track property) {
@if (patron[property]) {
<ion-row>
<ion-col>
{{ 'library.account.pages.profile.labels' + '.' + property | translate }}:
</ion-col>
<ion-col>
@if (!['expires'].includes(property)) {
{{ patron[property] }}
} @else {
@if (isUnlimitedExpiry(patron['expires'])) {
{{ 'library.account.pages.profile.values.unlimited' | translate }}
} @else {
{{ 'library.account.pages.profile.values.expires' | translate }}:&nbsp;{{
patron['expires'] | amDateFormat: 'll'
}}
}
}
</ion-col>
</ion-row>
}
<ion-row>
<ion-col> {{ 'library.account.pages.profile.labels.id' | translate }}: </ion-col>
<ion-col>
{{ patron.id }}
</ion-col>
</ion-row>
<ion-row>
<ion-col> {{ 'library.account.pages.profile.labels.name' | translate }}: </ion-col>
<ion-col> {{ patron.name_details?.title ?? '' }} {{ patron.name }} </ion-col>
</ion-row>
@if (patron.email) {
<ion-row>
<ion-col> {{ 'library.account.pages.profile.labels.email' | translate }}: </ion-col>
<ion-col>
{{ patron.email }}
</ion-col>
</ion-row>
}
@if (patron.address) {
<ion-row>
<ion-col> {{ 'library.account.pages.profile.labels.address' | translate }}: </ion-col>
<ion-col>
{{ patron.address }}
</ion-col>
</ion-row>
}
@if (patron.expires) {
<ion-row>
<ion-col> {{ 'library.account.pages.profile.labels.expires' | translate }}: </ion-col>
<ion-col>
@if (isUnlimitedExpiry(patron.expires)) {
{{ 'library.account.pages.profile.values.unlimited' | translate }}
} @else {
{{ 'library.account.pages.profile.values.expires' | translate }}:&nbsp;{{
patron.expires | amDateFormat: 'll'
}}
}
</ion-col>
</ion-row>
}
</ion-grid>
</ion-card-content>

View File

@@ -22,6 +22,13 @@ export interface PAIAPatron {
status?: PAIAPatronStatus;
type?: string;
note?: string;
// HeBIS specific property (not in PAIA documentation)
name_details?: {
firstname?: string;
lastname?: string;
gender?: string;
title?: string;
};
}
export enum PAIAPatronStatus {

View File

@@ -21,7 +21,7 @@ export const environment = {
backend_url: 'https://mobile.server.uni-frankfurt.de',
app_host: 'mobile.app.uni-frankfurt.de',
custom_url_scheme: 'de.anyschool.app',
backend_version: '999.0.0',
backend_version: '3.3.0',
production: true,
};

View File

@@ -6,7 +6,8 @@
"outDir": "./dist/out-tsc",
"declaration": false,
"isolatedModules": false,
"allowSyntheticDefaultImports": true,
"checkJs": false,
"allowJs": false,
"strictPropertyInitialization": false,
"downlevelIteration": true,
"importHelpers": true,
@@ -19,6 +20,3 @@
},
"exclude": ["**/*.spec.ts"]
}

View File

@@ -8,7 +8,7 @@ LABEL version="2.0.0" \
### Configure versions to install
ENV ANDROID_APIS="android-33" \
ANDROID_BUILD_TOOLS_VERSION="30.0.2" \
NPM_VERSION="^9.0.0" \
NPM_VERSION="^10.0.0" \
IONIC_VERSION="^6.0.0" \
CORDOVA_RES_VERSION="latest" \
### Configure download URLs

View File

@@ -1,372 +1,108 @@
#!/bin/bash
# Discussion, issues and change requests at:
# https://github.com/nodesource/distributions
#
# Script to install the NodeSource Node.js 18.x repo onto a
# Debian or Ubuntu system.
#
# Run as root or insert `sudo -E` before `bash`:
#
# curl -sL https://deb.nodesource.com/setup_18.x | bash -
# or
# wget -qO- https://deb.nodesource.com/setup_18.x | bash -
#
# CONTRIBUTIONS TO THIS SCRIPT
#
# This script is built from a template in
# https://github.com/nodesource/distributions/tree/master/deb/src
# please don't submit pull requests against the built scripts.
#
# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"
case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac
export DEBIAN_FRONTEND=noninteractive
SCRSUFFIX="_18.x"
NODENAME="Node.js 18.x"
NODEREPO="node_18.x"
NODEPKG="nodejs"
print_status() {
echo
echo "## $1"
echo
echo -e "${color}${timestamp} - ${message}${endcolor}"
}
if test -t 1; then # if terminal
ncolors=$(which tput > /dev/null && tput colors) # supports color
if test -n "$ncolors" && test $ncolors -ge 8; then
termcols=$(tput cols)
bold="$(tput bold)"
underline="$(tput smul)"
standout="$(tput smso)"
normal="$(tput sgr0)"
black="$(tput setaf 0)"
red="$(tput setaf 1)"
green="$(tput setaf 2)"
yellow="$(tput setaf 3)"
blue="$(tput setaf 4)"
magenta="$(tput setaf 5)"
cyan="$(tput setaf 6)"
white="$(tput setaf 7)"
fi
fi
print_bold() {
title="$1"
text="$2"
echo
echo "${red}================================================================================${normal}"
echo "${red}================================================================================${normal}"
echo
echo -e " ${bold}${yellow}${title}${normal}"
echo
echo -en " ${text}"
echo
echo "${red}================================================================================${normal}"
echo "${red}================================================================================${normal}"
# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}
bail() {
echo 'Error executing command, exiting'
exit 1
# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}
exec_cmd_nobail() {
echo "+ $1"
bash -c "$1"
}
exec_cmd() {
exec_cmd_nobail "$1" || bail
}
node_deprecation_warning() {
if [[ "X${NODENAME}" == "Xio.js 1.x" ||
"X${NODENAME}" == "Xio.js 2.x" ||
"X${NODENAME}" == "Xio.js 3.x" ||
"X${NODENAME}" == "XNode.js 0.10" ||
"X${NODENAME}" == "XNode.js 0.12" ||
"X${NODENAME}" == "XNode.js 4.x LTS Argon" ||
"X${NODENAME}" == "XNode.js 5.x" ||
"X${NODENAME}" == "XNode.js 6.x LTS Boron" ||
"X${NODENAME}" == "XNode.js 7.x" ||
"X${NODENAME}" == "XNode.js 8.x LTS Carbon" ||
"X${NODENAME}" == "XNode.js 9.x" ||
"X${NODENAME}" == "XNode.js 10.x" ||
"X${NODENAME}" == "XNode.js 11.x" ||
"X${NODENAME}" == "XNode.js 12.x" ||
"X${NODENAME}" == "XNode.js 13.x" ||
"X${NODENAME}" == "XNode.js 14.x" ||
"X${NODENAME}" == "XNode.js 15.x" ||
"X${NODENAME}" == "XNode.js 17.x" ]]; then
print_bold \
" DEPRECATION WARNING " "\
${bold}${NODENAME} is no longer actively supported!${normal}
${bold}You will not receive security or critical stability updates${normal} for this version.
You should migrate to a supported version of Node.js as soon as possible.
Use the installation script that corresponds to the version of Node.js you
wish to install. e.g.
* ${green}https://deb.nodesource.com/setup_16.x — Node.js 16 \"Gallium\"${normal}
* ${green}https://deb.nodesource.com/setup_18.x — Node.js 18 LTS \"Hydrogen\"${normal} (recommended)
* ${green}https://deb.nodesource.com/setup_19.x — Node.js 19 \"Nineteen\"${normal}
* ${green}https://deb.nodesource.com/setup_20.x — Node.js 20 \"Iron\"${normal} (current)
Please see ${bold}https://github.com/nodejs/Release${normal} for details about which
version may be appropriate for you.
The ${bold}NodeSource${normal} Node.js distributions repository contains
information both about supported versions of Node.js and supported Linux
distributions. To learn more about usage, see the repository:
${bold}https://github.com/nodesource/distributions${normal}
"
echo
echo "Continuing in 20 seconds ..."
echo
sleep 20
check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}
script_deprecation_warning() {
if [ "X${SCRSUFFIX}" == "X" ]; then
print_bold \
" SCRIPT DEPRECATION WARNING " "\
This script, located at ${bold}https://deb.nodesource.com/setup${normal}, used to
install Node.js 0.10, is deprecated and will eventually be made inactive.
# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
You should use the script that corresponds to the version of Node.js you
wish to install. e.g.
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi
* ${green}https://deb.nodesource.com/setup_16.x — Node.js 16 \"Gallium\"${normal}
* ${green}https://deb.nodesource.com/setup_18.x — Node.js 18 LTS \"Hydrogen\"${normal} (recommended)
* ${green}https://deb.nodesource.com/setup_19.x — Node.js 19 \"Nineteen\"${normal}
* ${green}https://deb.nodesource.com/setup_20.x — Node.js 20 \"Iron\"${normal} (current)
# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi
Please see ${bold}https://github.com/nodejs/Release${normal} for details about which
version may be appropriate for you.
if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi
The ${bold}NodeSource${normal} Node.js Linux distributions GitHub repository contains
information about which versions of Node.js and which Linux distributions
are supported and how to use the install scripts.
${bold}https://github.com/nodesource/distributions${normal}
"
rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true
echo
echo "Continuing in 20 seconds (press Ctrl-C to abort) ..."
echo
sleep 20
# Run 'curl' and 'gpg'
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi
}
setup() {
# Function to configure the Repo
configure_repo() {
local node_version=$1
script_deprecation_warning
node_deprecation_warning
arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi
print_status "Installing the NodeSource ${NODENAME} repo..."
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
if $(uname -m | grep -Eq ^armv6); then
print_status "You appear to be running on ARMv6 hardware. Unfortunately this is not currently supported by the NodeSource Linux distributions. Please use the 'linux-armv6l' binary tarballs available directly from nodejs.org for Node.js 4 and later."
exit 1
fi
# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
PRE_INSTALL_PKGS=""
# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
# Check that HTTPS transport is available to APT
# (Check snaked from: https://get.docker.io/ubuntu/)
if [ ! -e /usr/lib/apt/methods/https ]; then
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} apt-transport-https"
fi
if [ ! -x /usr/bin/lsb_release ]; then
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} lsb-release"
fi
if [ ! -x /usr/bin/curl ] && [ ! -x /usr/bin/wget ]; then
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} curl"
fi
# Used by apt-key to add new keys
if [ ! -x /usr/bin/gpg ]; then
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} gnupg"
fi
# Populating Cache
print_status "Populating apt-get cache..."
exec_cmd 'apt-get update'
if [ "X${PRE_INSTALL_PKGS}" != "X" ]; then
print_status "Installing packages required for setup:${PRE_INSTALL_PKGS}..."
# This next command needs to be redirected to /dev/null or the script will bork
# in some environments
exec_cmd "apt-get install -y${PRE_INSTALL_PKGS} > /dev/null 2>&1"
fi
IS_PRERELEASE=$(lsb_release -d | grep 'Ubuntu .*development' >& /dev/null; echo $?)
if [[ $IS_PRERELEASE -eq 0 ]]; then
print_status "Your distribution, identified as \"$(lsb_release -d -s)\", is a pre-release version of Ubuntu. NodeSource does not maintain official support for Ubuntu versions until they are formally released. You can try using the manual installation instructions available at https://github.com/nodesource/distributions and use the latest supported Ubuntu version name as the distribution identifier, although this is not guaranteed to work."
exit 1
fi
DISTRO=$(lsb_release -c -s)
check_alt() {
if [ "X${DISTRO}" == "X${2}" ]; then
echo
echo "## You seem to be using ${1} version ${DISTRO}."
echo "## This maps to ${3} \"${4}\"... Adjusting for you..."
DISTRO="${4}"
# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}
check_alt "Astra Linux" "orel" "Debian" "stretch"
check_alt "BOSS" "anokha" "Debian" "wheezy"
check_alt "BOSS" "anoop" "Debian" "jessie"
check_alt "BOSS" "drishti" "Debian" "stretch"
check_alt "BOSS" "unnati" "Debian" "buster"
check_alt "BOSS" "urja" "Debian" "bullseye"
check_alt "bunsenlabs" "bunsen-hydrogen" "Debian" "jessie"
check_alt "bunsenlabs" "helium" "Debian" "stretch"
check_alt "bunsenlabs" "lithium" "Debian" "buster"
check_alt "Devuan" "jessie" "Debian" "jessie"
check_alt "Devuan" "ascii" "Debian" "stretch"
check_alt "Devuan" "beowulf" "Debian" "buster"
check_alt "Devuan" "chimaera" "Debian" "bullseye"
check_alt "Devuan" "ceres" "Debian" "sid"
check_alt "Devuan" "daedalus" "Debian" "bookworm"
check_alt "Deepin" "panda" "Debian" "sid"
check_alt "Deepin" "unstable" "Debian" "sid"
check_alt "Deepin" "stable" "Debian" "buster"
check_alt "Deepin" "apricot" "Debian" "buster"
check_alt "Deepin" "beige" "Debian" "bookworm"
check_alt "elementaryOS" "luna" "Ubuntu" "precise"
check_alt "elementaryOS" "freya" "Ubuntu" "trusty"
check_alt "elementaryOS" "loki" "Ubuntu" "xenial"
check_alt "elementaryOS" "juno" "Ubuntu" "bionic"
check_alt "elementaryOS" "hera" "Ubuntu" "bionic"
check_alt "elementaryOS" "odin" "Ubuntu" "focal"
check_alt "elementaryOS" "jolnir" "Ubuntu" "focal"
check_alt "elementaryOS" "horus" "Ubuntu" "jammy"
check_alt "Kali" "sana" "Debian" "jessie"
check_alt "Kali" "kali-rolling" "Debian" "bullseye"
check_alt "Linux Mint" "maya" "Ubuntu" "precise"
check_alt "Linux Mint" "qiana" "Ubuntu" "trusty"
check_alt "Linux Mint" "rafaela" "Ubuntu" "trusty"
check_alt "Linux Mint" "rebecca" "Ubuntu" "trusty"
check_alt "Linux Mint" "rosa" "Ubuntu" "trusty"
check_alt "Linux Mint" "sarah" "Ubuntu" "xenial"
check_alt "Linux Mint" "serena" "Ubuntu" "xenial"
check_alt "Linux Mint" "sonya" "Ubuntu" "xenial"
check_alt "Linux Mint" "sylvia" "Ubuntu" "xenial"
check_alt "Linux Mint" "tara" "Ubuntu" "bionic"
check_alt "Linux Mint" "tessa" "Ubuntu" "bionic"
check_alt "Linux Mint" "tina" "Ubuntu" "bionic"
check_alt "Linux Mint" "tricia" "Ubuntu" "bionic"
check_alt "Linux Mint" "ulyana" "Ubuntu" "focal"
check_alt "Linux Mint" "ulyssa" "Ubuntu" "focal"
check_alt "Linux Mint" "uma" "Ubuntu" "focal"
check_alt "Linux Mint" "una" "Ubuntu" "focal"
check_alt "Linux Mint" "vanessa" "Ubuntu" "jammy"
check_alt "Linux Mint" "vera" "Ubuntu" "jammy"
check_alt "Liquid Lemur" "lemur-3" "Debian" "stretch"
check_alt "LMDE" "betsy" "Debian" "jessie"
check_alt "LMDE" "cindy" "Debian" "stretch"
check_alt "LMDE" "debbie" "Debian" "buster"
check_alt "LMDE" "elsie" "Debian" "bullseye"
check_alt "MX Linux 17" "Horizon" "Debian" "stretch"
check_alt "MX Linux 18" "Continuum" "Debian" "stretch"
check_alt "MX Linux 19" "patito feo" "Debian" "buster"
check_alt "MX Linux 21" "wildflower" "Debian" "bullseye"
check_alt "Pardus" "onyedi" "Debian" "stretch"
check_alt "Parrot" "ara" "Debian" "bullseye"
check_alt "PureOS" "green" "Debian" "sid"
check_alt "PureOS" "amber" "Debian" "buster"
check_alt "PureOS" "byzantium" "Debian" "bullseye"
check_alt "SolydXK" "solydxk-9" "Debian" "stretch"
check_alt "Sparky Linux" "Tyche" "Debian" "stretch"
check_alt "Sparky Linux" "Nibiru" "Debian" "buster"
check_alt "Sparky Linux" "Po-Tolo" "Debian" "bullseye"
check_alt "Tanglu" "chromodoris" "Debian" "jessie"
check_alt "Trisquel" "toutatis" "Ubuntu" "precise"
check_alt "Trisquel" "belenos" "Ubuntu" "trusty"
check_alt "Trisquel" "flidas" "Ubuntu" "xenial"
check_alt "Trisquel" "etiona" "Ubuntu" "bionic"
check_alt "Ubilinux" "dolcetto" "Debian" "stretch"
check_alt "Uruk GNU/Linux" "lugalbanda" "Ubuntu" "xenial"
# Define Node.js version
NODE_VERSION="18.x"
if [ "X${DISTRO}" == "Xdebian" ]; then
print_status "Unknown Debian-based distribution, checking /etc/debian_version..."
NEWDISTRO=$([ -e /etc/debian_version ] && cut -d/ -f1 < /etc/debian_version)
if [ "X${NEWDISTRO}" == "X" ]; then
print_status "Could not determine distribution from /etc/debian_version..."
else
DISTRO=$NEWDISTRO
print_status "Found \"${DISTRO}\" in /etc/debian_version..."
fi
fi
# Check OS
check_os
print_status "Confirming \"${DISTRO}\" is supported..."
if [ -x /usr/bin/curl ]; then
exec_cmd_nobail "curl -sLf -o /dev/null 'https://deb.nodesource.com/${NODEREPO}/dists/${DISTRO}/Release'"
RC=$?
else
exec_cmd_nobail "wget -qO /dev/null -o /dev/null 'https://deb.nodesource.com/${NODEREPO}/dists/${DISTRO}/Release'"
RC=$?
fi
if [[ $RC != 0 ]]; then
print_status "Your distribution, identified as \"${DISTRO}\", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support"
exit 1
fi
if [ -f "/etc/apt/sources.list.d/chris-lea-node_js-$DISTRO.list" ]; then
print_status 'Removing Launchpad PPA Repository for NodeJS...'
exec_cmd_nobail 'add-apt-repository -y -r ppa:chris-lea/node.js'
exec_cmd "rm -f /etc/apt/sources.list.d/chris-lea-node_js-${DISTRO}.list"
fi
print_status 'Adding the NodeSource signing key to your keyring...'
keyring='/usr/share/keyrings'
node_key_url="https://deb.nodesource.com/gpgkey/nodesource.gpg.key"
local_node_key="$keyring/nodesource.gpg"
if [ -x /usr/bin/curl ]; then
exec_cmd "curl -s $node_key_url | gpg --dearmor | tee $local_node_key >/dev/null"
else
exec_cmd "wget -q -O - $node_key_url | gpg --dearmor | tee $local_node_key >/dev/null"
fi
print_status "Creating apt sources list file for the NodeSource ${NODENAME} repo..."
exec_cmd "echo 'deb [signed-by=$local_node_key] https://deb.nodesource.com/${NODEREPO} ${DISTRO} main' > /etc/apt/sources.list.d/nodesource.list"
exec_cmd "echo 'deb-src [signed-by=$local_node_key] https://deb.nodesource.com/${NODEREPO} ${DISTRO} main' >> /etc/apt/sources.list.d/nodesource.list"
print_status 'Running `apt-get update` for you...'
exec_cmd 'apt-get update'
yarn_site='https://dl.yarnpkg.com/debian'
yarn_key_url="$yarn_site/pubkey.gpg"
local_yarn_key="$keyring/yarnkey.gpg"
print_status """Run \`${bold}sudo apt-get install -y ${NODEPKG}${normal}\` to install ${NODENAME} and npm
## You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
curl -sL $yarn_key_url | gpg --dearmor | sudo tee $local_yarn_key >/dev/null
echo \"deb [signed-by=$local_yarn_key] $yarn_site stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
"""
}
## Defer setup until we have the complete script
setup
# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"

View File

@@ -18,7 +18,7 @@
"format:fix": "dotenv -c -- turbo run format:fix",
"lint": "dotenv -c -- turbo run lint",
"lint:fix": "dotenv -c -- turbo run lint:fix",
"publish-packages": "pnpm changeset version && pnpm syncpack:fix && pnpm install && git add . && git commit -m \"docs: update changelogs for release\n\nci: publish release\" && git push && pnpm changeset tag && git push --follow-tags",
"publish-packages": "pnpm changeset version && pnpm syncpack:fix && pnpm install && pnpm format:fix && git add . && git commit -m \"docs: update changelogs for release\" -m \"ci: publish release\" && git push && pnpm changeset tag && git push --follow-tags",
"syncpack": "syncpack list-mismatches && syncpack lint-semver-ranges --types dev,peer,prod",
"syncpack:fix": "syncpack format && syncpack fix-mismatches",
"test": "trap 'node coverage.mjs' EXIT && dotenv -c -- turbo run test",

View File

@@ -1,5 +1,13 @@
# @openstapps/api-cli
## 3.3.2
### Patch Changes
- @openstapps/core@3.3.2
- @openstapps/core-tools@3.3.2
- @openstapps/api@3.3.2
## 3.3.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/api-cli",
"description": "CLI client for @openstapps/api",
"version": "3.3.0",
"version": "3.3.2",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/api.git",

View File

@@ -1,5 +1,13 @@
# @openstapps/api-plugin
## 3.3.2
### Patch Changes
- @openstapps/core@3.3.2
- @openstapps/core-tools@3.3.2
- @openstapps/api@3.3.2
## 3.3.0
### Patch Changes

View File

@@ -1,10 +0,0 @@
declare global {
namespace NodeJS {
interface ProcessEnv {
NODE_ENV?: string;
PORT?: string;
}
}
}
export {};

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/api-plugin",
"description": "Node.js library to interact with the StApps backend service",
"version": "3.3.0",
"version": "3.3.2",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/api.git",

View File

@@ -175,11 +175,13 @@ export abstract class Plugin {
// tslint:disable-next-line:no-floating-promises
Logger.error(`${bind} requires elevated privileges`);
process.exit(1);
break;
}
case 'EADDRINUSE': {
// tslint:disable-next-line:no-floating-promises
Logger.error(`${bind} is already in use`);
process.exit(1);
break;
}
default: {
throw error;

View File

@@ -1,5 +1,11 @@
# @openstapps/api
## 3.3.2
### Patch Changes
- @openstapps/core@3.3.2
## 3.3.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/api",
"description": "Node.js library to interact with the StApps backend service",
"version": "3.3.0",
"version": "3.3.2",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/api.git",

View File

@@ -128,8 +128,8 @@ export class Client {
size: 1,
});
if (response.data.length === 1 && response.data[0]!.uid === uid) {
return response.data[0]!;
if (response.data.length === 1 && response.data[0].uid === uid) {
return response.data[0];
}
throw new SCInternalServerErrorResponse(new SCNotFoundErrorResponse(true), true);
@@ -220,11 +220,11 @@ export class Client {
for (const key of Object.keys(multiSearchRequest)) {
const searchRequest = multiSearchRequest[key];
if (searchRequest?.size === undefined) {
if (searchRequest.size === undefined) {
preFlightRequest[key] = {
...searchRequest,
};
preFlightRequest[key]!.size = 0;
preFlightRequest[key].size = 0;
preFlightNecessary = true;
}
}
@@ -245,8 +245,8 @@ export class Client {
);
// set size for multi search requests that were in pre flight request
for (const key in preFlightRequest) {
returnMultiSearchRequest[key]!.size = preFlightResponse[key]!.pagination.total;
for (const key of Object.keys(preFlightRequest)) {
returnMultiSearchRequest[key].size = preFlightResponse[key].pagination.total;
}
}

View File

@@ -212,7 +212,7 @@ export class ConnectorClient extends Client {
const thingSource = source === undefined ? 'stapps-api' : source;
// request a new bulk
const bulk = await this.bulk(things[0]!.type, thingSource, timeout);
const bulk = await this.bulk(things[0].type, thingSource, timeout);
// add items to the bulk - 5 concurrently
await Promise.all(

View File

@@ -33,7 +33,7 @@ export class ApiError extends Error {
/**
* Add additional data to the output of the error
*/
override toString(): string {
toString(): string {
let string_ = super.toString();
// add additional data

View File

@@ -20,7 +20,7 @@ export function groupBy<T>(collection: T[], group: (item: T) => string | undefin
return collection.reduce((accumulator: Record<string, T[]>, item) => {
const key = group(item) ?? '';
accumulator[key] = accumulator[key] ?? [];
accumulator[key]!.push(item);
accumulator[key].push(item);
return accumulator;
}, {});
}

View File

@@ -21,7 +21,7 @@ export function shuffle<T>(array: T[]): T[] {
const out = [];
while (copy.length > 0) {
out.push(copy.splice(Math.floor(Math.random() * copy.length), 1)[0]!);
out.push(copy.splice(Math.floor(Math.random() * copy.length), 1)[0]);
}
return out;

View File

@@ -17,5 +17,5 @@
* Zip two arrays together.
*/
export function zip<T, U>(a: T[], b: U[]): [T, U][] {
return a.map((_, i) => [a[i]!, b[i]!]);
return a.map((_, i) => [a[i], b[i]]);
}

View File

@@ -1,5 +1,12 @@
# @openstapps/core-tools
## 3.3.2
### Patch Changes
- Updated dependencies [802a7a3f]
- @openstapps/easy-ast@3.3.2
## 3.3.0
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/core-tools",
"description": "Tools to convert and validate StAppsCore",
"version": "3.3.0",
"version": "3.3.2",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/core-tools.git",

View File

@@ -60,11 +60,11 @@ commander
// get information about routes
const routes = await gatherRouteInformation(sourcePath);
routes.sort((a, b) => a.route['urlPath'].localeCompare(b.route['urlPath']));
routes.sort((a, b) => a.route.urlPath.localeCompare(b.route.urlPath));
// change url path parameters to openapi notation
for (const routeWithMetaInformation of routes) {
routeWithMetaInformation.route['urlPath'] = routeWithMetaInformation.route['urlPath'].replaceAll(
routeWithMetaInformation.route.urlPath = routeWithMetaInformation.route.urlPath.replaceAll(
/:\w+/g,
(match: string) => `{${match.replace(':', '')}}`,
);
@@ -72,7 +72,7 @@ commander
// keep openapi tags for routes that actually share url fragments
let tagsToKeep = routes.map(routeWithMetaInformation =>
capitalize(routeWithMetaInformation.route['urlPath'].split('/')[1]),
capitalize(routeWithMetaInformation.route.urlPath.split('/')[1]),
);
tagsToKeep = tagsToKeep.filter(
(element, i, array) => array.indexOf(element) === i && array.lastIndexOf(element) !== i,
@@ -83,9 +83,9 @@ commander
// generate documentation for all routes
for (const routeWithMetaInformation of routes) {
routeWithMetaInformation.tags = [capitalize(routeWithMetaInformation.route['urlPath'].split('/')[1])];
routeWithMetaInformation.tags = [capitalize(routeWithMetaInformation.route.urlPath.split('/')[1])];
output.paths[routeWithMetaInformation.route['urlPath']] = generateOpenAPIForRoute(
output.paths[routeWithMetaInformation.route.urlPath] = generateOpenAPIForRoute(
routeWithMetaInformation,
path.relative(relativeOutDirectoryPath, outDirectorySchemasPath),
tagsToKeep,
@@ -165,7 +165,7 @@ commander
continue;
}
unexpected = unexpected || errorsPerFile[file]?.some(error => !error.expected) || false;
unexpected = unexpected || errorsPerFile[file].some(error => !error.expected);
}
if (relativeReportPath !== undefined) {

View File

@@ -48,7 +48,7 @@ export async function gatherRouteInformation(path: string): Promise<RouteWithMet
// instantiate all errors
instantiatedRoute.errors = await Promise.all(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
instantiatedRoute['errorNames'].map(async (error: any) =>
instantiatedRoute.errorNames.map(async (error: any) =>
// eslint-disable-next-line @typescript-eslint/ban-types
Object.assign((await project.instantiateDefinitionByName(error.name)) as object, {
name: error.name,
@@ -57,10 +57,10 @@ export async function gatherRouteInformation(path: string): Promise<RouteWithMet
);
instantiatedRoute.responseBodyDescription =
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
project.definitions[instantiatedRoute['responseBodyName']]?.comment?.shortSummary!;
project.definitions[instantiatedRoute.responseBodyName]?.comment?.shortSummary!;
instantiatedRoute.requestBodyDescription =
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
project.definitions[instantiatedRoute['requestBodyName']]?.comment?.shortSummary!;
project.definitions[instantiatedRoute.requestBodyName]?.comment?.shortSummary!;
return {
description: {
@@ -89,7 +89,7 @@ export function generateOpenAPIForRoute(
const route = routeWithInfo.route;
const openapiPath: OpenAPIV3.PathItemObject = {};
openapiPath[route['method'].toLowerCase() as OpenAPIV3.HttpMethods] = {
openapiPath[route.method.toLowerCase() as OpenAPIV3.HttpMethods] = {
summary: capitalize(routeWithInfo.description.shortText?.replace(/(Route to |Route for )/gim, '')),
description: routeWithInfo.description.text,
requestBody: {
@@ -97,7 +97,7 @@ export function generateOpenAPIForRoute(
content: {
'application/json': {
schema: {
$ref: path.join(outDirectorySchemasPath, `${route['requestBodyName']}.json`),
$ref: path.join(outDirectorySchemasPath, `${route.requestBodyName}.json`),
},
},
},
@@ -117,21 +117,19 @@ export function generateOpenAPIForRoute(
tags: routeWithInfo.tags?.filter(value => tagsToKeep.includes(value)),
};
openapiPath[route['method'].toLowerCase() as OpenAPIV3.HttpMethods]!.responses![
route['statusCodeSuccess']
] = {
openapiPath[route.method.toLowerCase() as OpenAPIV3.HttpMethods]!.responses![route.statusCodeSuccess] = {
description: route.responseBodyDescription,
content: {
'application/json': {
schema: {
$ref: path.join(outDirectorySchemasPath, `${route['responseBodyName']}.json`),
$ref: path.join(outDirectorySchemasPath, `${route.responseBodyName}.json`),
},
},
},
};
for (const error of route.errors) {
openapiPath[route['method'].toLowerCase() as OpenAPIV3.HttpMethods]!.responses![error.statusCode] = {
openapiPath[route.method.toLowerCase() as OpenAPIV3.HttpMethods]!.responses![error.statusCode] = {
description:
error.message ?? capitalize(error.name.replaceAll(/([A-Z][a-z])/g, ' $1').replace('SC ', '')),
content: {
@@ -144,8 +142,8 @@ export function generateOpenAPIForRoute(
};
}
if (typeof route['obligatoryParameters'] === 'object') {
for (const [parameter, schemaDefinition] of Object.entries(route['obligatoryParameters'])) {
if (typeof route.obligatoryParameters === 'object') {
for (const [parameter, schemaDefinition] of Object.entries(route.obligatoryParameters)) {
const openapiParameter: OpenAPIV3.ParameterObject = {
in: 'path',
name: parameter,
@@ -155,7 +153,7 @@ export function generateOpenAPIForRoute(
$ref: `schema/SCSearchResponse.json#/definitions/${schemaDefinition}`,
},
};
openapiPath[route['method'].toLowerCase() as OpenAPIV3.HttpMethods]?.parameters?.push(openapiParameter);
openapiPath[route.method.toLowerCase() as OpenAPIV3.HttpMethods]?.parameters?.push(openapiParameter);
}
}

View File

@@ -194,7 +194,7 @@ function createPlantUMLCodeForClass(config: UMLConfig, readerClass: LightweightC
if (config.showProperties && readerClass.properties) {
for (const key in readerClass.properties) {
const property = readerClass.properties[key];
if (property?.optional && !config.showOptionalProperties) {
if (property.optional && !config.showOptionalProperties) {
// don't show optional attributes
continue;
}
@@ -202,7 +202,7 @@ function createPlantUMLCodeForClass(config: UMLConfig, readerClass: LightweightC
// don't show inherited properties
continue;
}*/
model += `\n\t${createPropertyLine(property!)}`;
model += `\n\t${createPropertyLine(property)}`;
}
}
@@ -213,13 +213,13 @@ function createPlantUMLCodeForClass(config: UMLConfig, readerClass: LightweightC
if (readerClass.properties) {
for (const key in readerClass.properties) {
const property = readerClass.properties[key];
const types: string[] = getReferenceTypes(property!.type);
const types: string[] = getReferenceTypes(property.type);
for (const type of types) {
if (config.showAssociations) {
/*if (property.inherited && !config.showInheritedProperties) {
continue;
}*/
model += `${readerClass.name} -up-> ${type} : ${property!.name} >\n`;
model += `${readerClass.name} -up-> ${type} : ${property.name} >\n`;
}
}
}

View File

@@ -111,7 +111,7 @@ export class Validator {
}
// schema will be cached
return this.ajvValidateWrapper(this.schemas[schema]!, instance);
return this.ajvValidateWrapper(this.schemas[schema], instance);
}
return this.ajvValidateWrapper(schema, instance);
@@ -147,7 +147,7 @@ function fromAjvResult(
const error: ValidationError = {
dataPath: ajvError.instancePath,
instance: instance,
message: betterErrorObject?.[index]?.error ?? ajvError.message!,
message: betterErrorObject?.[index]?.error ?? ajvError.message,
name: ajvError.keyword,
schemaPath: ajvError.schemaPath,
suggestion: betterErrorObject?.[index]?.suggestion,
@@ -223,7 +223,7 @@ export async function validateFiles(
}
// add error to list of errors
errors[testFileName]?.push({
errors[testFileName].push({
...error,
expected,
});
@@ -234,7 +234,7 @@ export async function validateFiles(
for (const error of expectedErrors) {
await Logger.error(`Extraneous expected error '${error}' in ${testFile}.`);
errors[testFileName]?.push({
errors[testFileName].push({
dataPath: 'undefined',
expected: false,
instance: undefined,
@@ -279,7 +279,7 @@ export async function writeReport(reportPath: PathLike, errors: ExpectedValidati
let fileOutput = '';
for (const [index, error] of errors[fileName]!.entries()) {
for (const [index, error] of errors[fileName].entries()) {
fileOutput += mustache.render(errorTemplate, {
idx: index + 1,
instance: JSON.stringify(error.instance, undefined, 2),

View File

@@ -1,5 +1,11 @@
# @openstapps/core
## 3.3.2
### Patch Changes
- @openstapps/core-tools@3.3.2
## 3.3.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/core",
"description": "StAppsCore - Generalized model of data",
"version": "3.3.0",
"version": "3.3.2",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/core.git",

View File

@@ -102,14 +102,14 @@ export function isSearchResponse(something: unknown): something is SCSearchRespo
const somethingObject = something as {[key: string]: {[key: string]: string}};
return (
Array.isArray(somethingObject['data']) &&
Array.isArray(somethingObject['facets']) &&
somethingObject['pagination'] !== undefined &&
typeof somethingObject['pagination']['count'] === 'number' &&
typeof somethingObject['pagination']['offset'] === 'number' &&
typeof somethingObject['pagination']['total'] === 'number' &&
somethingObject['stats'] !== undefined &&
typeof somethingObject['stats']['time'] === 'number'
Array.isArray(somethingObject.data) &&
Array.isArray(somethingObject.facets) &&
somethingObject.pagination !== undefined &&
typeof somethingObject.pagination.count === 'number' &&
typeof somethingObject.pagination.offset === 'number' &&
typeof somethingObject.pagination.total === 'number' &&
somethingObject.stats !== undefined &&
typeof somethingObject.stats.time === 'number'
);
}

View File

@@ -55,7 +55,7 @@ export class SCAcademicDegreeMeta extends SCThingMeta implements SCMetaTranslati
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
academicDegree: 'Abschlussgrad',
@@ -73,7 +73,7 @@ export class SCAcademicDegreeMeta extends SCThingMeta implements SCMetaTranslati
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},

View File

@@ -67,7 +67,7 @@ export class SCAcademicTermWithoutReferencesMeta extends SCThingMeta implements
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
acronym: 'Akronym',
@@ -89,7 +89,7 @@ export class SCAcademicTermWithoutReferencesMeta extends SCThingMeta implements
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},

View File

@@ -124,7 +124,7 @@ export class SCCreativeWorkMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
name: 'Titel',
@@ -162,7 +162,7 @@ export class SCCreativeWorkMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},

View File

@@ -79,7 +79,7 @@ export class SCEventMeta extends SCThingMeta implements SCMetaTranslations<SCEve
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
academicTerms: 'Semester',
@@ -105,7 +105,7 @@ export class SCEventMeta extends SCThingMeta implements SCMetaTranslations<SCEve
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},

View File

@@ -134,7 +134,7 @@ export class SCPlaceWithoutReferencesMeta
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
address: 'Adresse',
@@ -152,7 +152,7 @@ export class SCPlaceWithoutReferencesMeta
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},

View File

@@ -30,7 +30,7 @@ export class SCThingInPlaceMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
inPlace: 'Ort',
@@ -44,7 +44,7 @@ export class SCThingInPlaceMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},

View File

@@ -48,7 +48,7 @@ export class SCThingThatAcceptsPaymentsWithoutReferencesMeta
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
paymentsAccepted: 'Bezahlmethoden',
@@ -62,7 +62,7 @@ export class SCThingThatAcceptsPaymentsWithoutReferencesMeta
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
paymentsAccepted: {

View File

@@ -119,7 +119,7 @@ export class SCAcademicEventMeta extends SCThingMeta implements SCMetaTranslatio
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCEventMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
@@ -143,7 +143,7 @@ export class SCAcademicEventMeta extends SCThingMeta implements SCMetaTranslatio
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCEventMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<

View File

@@ -119,7 +119,7 @@ export class SCArticleMeta extends SCThingMeta implements SCMetaTranslations<SCA
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCCreativeWorkMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
@@ -147,7 +147,7 @@ export class SCArticleMeta extends SCThingMeta implements SCMetaTranslations<SCA
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCCreativeWorkMeta().fieldValueTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldValueTranslations.de,

View File

@@ -120,7 +120,7 @@ export class SCAssessmentMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCAssessmentCategories,
@@ -152,7 +152,7 @@ export class SCAssessmentMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCAssessmentCategories,

View File

@@ -131,7 +131,7 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCCreativeWorkMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
@@ -159,7 +159,7 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCCreativeWorkMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<

View File

@@ -95,7 +95,7 @@ export class SCBuildingMeta extends SCThingMeta implements SCMetaTranslations<SC
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCBuildingCategories,
@@ -117,7 +117,7 @@ export class SCBuildingMeta extends SCThingMeta implements SCMetaTranslations<SC
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCBuildingCategories,

View File

@@ -85,7 +85,7 @@ export class SCCatalogMeta extends SCThingMeta implements SCMetaTranslations<SCC
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCCatalogCategories,
@@ -111,7 +111,7 @@ export class SCCatalogMeta extends SCThingMeta implements SCMetaTranslations<SCC
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCCatalogCategories,

View File

@@ -80,7 +80,7 @@ export type SCCertificationCategories =
| 'rainforest protection';
export class SCCertificationMeta extends SCThingMeta implements SCMetaTranslations<SCCertification> {
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
@@ -101,7 +101,7 @@ export class SCCertificationMeta extends SCThingMeta implements SCMetaTranslatio
},
};
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<

View File

@@ -83,7 +83,7 @@ export class SCContactPointMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
areaServed: 'Arbeitsraum',
@@ -107,7 +107,7 @@ export class SCContactPointMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
type: 'Kontaktinformation',

View File

@@ -112,7 +112,7 @@ export class SCCourseOfStudyMeta extends SCThingMeta implements SCMetaTranslatio
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCAcademicDegreeMeta().fieldTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldTranslations.de,
@@ -138,7 +138,7 @@ export class SCCourseOfStudyMeta extends SCThingMeta implements SCMetaTranslatio
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCAcademicDegreeMeta().fieldValueTranslations.de,
modes: {

View File

@@ -112,7 +112,7 @@ export class SCDateSeriesMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingInPlaceMeta().fieldTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCSportCoursePriceGroup>().fieldTranslations.de,
@@ -138,7 +138,7 @@ export class SCDateSeriesMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingInPlaceMeta().fieldValueTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCSportCoursePriceGroup>().fieldValueTranslations.de,

View File

@@ -66,7 +66,7 @@ export class SCDiffMeta extends SCThingMeta implements SCMetaTranslations<SCDiff
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
action: 'Aktion',
@@ -86,7 +86,7 @@ export class SCDiffMeta extends SCThingMeta implements SCMetaTranslations<SCDiff
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
action: {

View File

@@ -205,7 +205,7 @@ export class SCDishMeta extends SCThingMeta implements SCMetaTranslations<SCDish
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCDishCategories,
@@ -237,7 +237,7 @@ export class SCDishMeta extends SCThingMeta implements SCMetaTranslations<SCDish
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCDishCategories,

View File

@@ -107,7 +107,7 @@ export class SCFloorMeta extends SCThingMeta implements SCMetaTranslations<SCFlo
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingInPlaceMeta().fieldTranslations.de,
floorName: 'Etagenbezeichnung',
@@ -123,7 +123,7 @@ export class SCFloorMeta extends SCThingMeta implements SCMetaTranslations<SCFlo
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingInPlaceMeta().fieldValueTranslations.de,
type: 'Etage',

View File

@@ -66,7 +66,7 @@ export class SCIdCardMeta extends SCThingMeta implements SCMetaTranslations<SCId
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
validity: 'Gültigkeit',
@@ -80,7 +80,7 @@ export class SCIdCardMeta extends SCThingMeta implements SCMetaTranslations<SCId
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
type: 'Ausweis',

View File

@@ -54,7 +54,7 @@ export interface SCJobPosting
}
export class SCJobPostingMeta extends SCThingMeta {
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta().fieldTranslations.de,
@@ -67,7 +67,7 @@ export class SCJobPostingMeta extends SCThingMeta {
},
};
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta().fieldValueTranslations.de,

View File

@@ -122,7 +122,7 @@ export class SCMessageMeta extends SCThingMeta implements SCMetaTranslations<SCM
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCCreativeWorkMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
@@ -152,7 +152,7 @@ export class SCMessageMeta extends SCThingMeta implements SCMetaTranslations<SCM
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCCreativeWorkMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<

View File

@@ -51,7 +51,7 @@ export class SCOrganizationMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingInPlaceMeta().fieldTranslations.de,
contactPoints: 'Kontaktinformationen',
@@ -65,7 +65,7 @@ export class SCOrganizationMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingInPlaceMeta().fieldValueTranslations.de,
type: 'Einrichtung',

View File

@@ -103,7 +103,7 @@ export class SCPeriodicalMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCCreativeWorkMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
@@ -129,7 +129,7 @@ export class SCPeriodicalMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCCreativeWorkMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<

View File

@@ -154,7 +154,7 @@ export class SCPersonMeta extends SCThingMeta implements SCMetaTranslations<SCPe
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
additionalName: 'Zusatzname',
@@ -197,7 +197,7 @@ export class SCPersonMeta extends SCThingMeta implements SCMetaTranslations<SCPe
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
gender: {

View File

@@ -82,7 +82,7 @@ export class SCPointOfInterestMeta extends SCThingMeta implements SCMetaTranslat
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCPointOfInterestCategories,
@@ -104,7 +104,7 @@ export class SCPointOfInterestMeta extends SCThingMeta implements SCMetaTranslat
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCPointOfInterestCategories,

View File

@@ -70,7 +70,7 @@ export class SCPublicationEventMeta extends SCThingMeta implements SCMetaTransla
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCEventMeta().fieldTranslations.de,
locations: 'Erscheinungsorte',
@@ -86,7 +86,7 @@ export class SCPublicationEventMeta extends SCThingMeta implements SCMetaTransla
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCEventMeta().fieldValueTranslations.de,
type: 'Veröffentlichung',

View File

@@ -130,7 +130,7 @@ export class SCRoomMeta extends SCThingMeta implements SCMetaTranslations<SCRoom
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCPlaceWithoutReferencesMeta().fieldTranslations.de,
...new SCThingThatAcceptsPaymentsWithoutReferencesMeta().fieldTranslations.de,
@@ -156,7 +156,7 @@ export class SCRoomMeta extends SCThingMeta implements SCMetaTranslations<SCRoom
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCPlaceWithoutReferencesMeta().fieldValueTranslations.de,
...new SCThingThatAcceptsPaymentsWithoutReferencesMeta().fieldValueTranslations.de,

View File

@@ -57,7 +57,7 @@ export class SCSemesterMeta extends SCThingMeta implements SCMetaTranslations<SC
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCAcademicTermWithoutReferencesMeta().fieldTranslations.de,
acronym: 'Abkürzung',
@@ -79,7 +79,7 @@ export class SCSemesterMeta extends SCThingMeta implements SCMetaTranslations<SC
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCAcademicTermWithoutReferencesMeta().fieldValueTranslations.de,
type: 'Semester',

View File

@@ -121,7 +121,7 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCSettingCategories,
@@ -149,7 +149,7 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCSettingCategories,

View File

@@ -45,7 +45,7 @@ export class SCSportCourseMeta extends SCThingMeta implements SCMetaTranslations
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCEventMeta().fieldTranslations.de,
},
@@ -57,7 +57,7 @@ export class SCSportCourseMeta extends SCThingMeta implements SCMetaTranslations
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCEventMeta().fieldValueTranslations.de,
type: 'Sportkurs',

View File

@@ -140,7 +140,7 @@ export class SCStudyModuleMeta extends SCThingMeta implements SCMetaTranslations
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldTranslations.de,
@@ -172,7 +172,7 @@ export class SCStudyModuleMeta extends SCThingMeta implements SCMetaTranslations
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldValueTranslations.de,

View File

@@ -62,7 +62,7 @@ export class SCTicketMeta extends SCThingMeta implements SCMetaTranslations<SCTi
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingInPlaceMeta().fieldTranslations.de,
approxWaitingTime: 'ungefähre Wartezeit',
@@ -80,7 +80,7 @@ export class SCTicketMeta extends SCThingMeta implements SCMetaTranslations<SCTi
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingInPlaceMeta().fieldValueTranslations.de,
type: 'Ticket',

View File

@@ -86,7 +86,7 @@ export class SCToDoMeta extends SCThingMeta implements SCMetaTranslations<SCToDo
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<string, SCThingWithCategoriesSpecificValues>()
.fieldTranslations.de,
@@ -106,7 +106,7 @@ export class SCToDoMeta extends SCThingMeta implements SCMetaTranslations<SCToDo
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<string, SCThingWithCategoriesSpecificValues>()
.fieldValueTranslations.de,

View File

@@ -56,7 +56,7 @@ export class SCTourMeta extends SCThingMeta implements SCMetaTranslations<SCTour
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
init: 'Initiales Skript',
@@ -72,7 +72,7 @@ export class SCTourMeta extends SCThingMeta implements SCMetaTranslations<SCTour
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
type: 'Tour',

View File

@@ -164,7 +164,7 @@ export class SCVideoMeta extends SCThingMeta implements SCMetaTranslations<SCVid
/**
* Translations of fields
*/
override fieldTranslations = {
fieldTranslations = {
de: {
...new SCCreativeWorkMeta().fieldTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldTranslations.de,
@@ -190,7 +190,7 @@ export class SCVideoMeta extends SCThingMeta implements SCMetaTranslations<SCVid
/**
* Translations of values of fields
*/
override fieldValueTranslations = {
fieldValueTranslations = {
de: {
...new SCCreativeWorkMeta().fieldValueTranslations.de,
...new SCThingThatCanBeOfferedMeta<SCAcademicPriceGroup>().fieldValueTranslations.de,

View File

@@ -76,7 +76,7 @@ export class SCThingTranslator {
this.metaClasses = SCClasses;
// Initalize all meta classes once
if (typeof (this.metaClasses as any)[Object.keys(this.metaClasses)[0]!] === 'function') {
if (typeof (this.metaClasses as any)[Object.keys(this.metaClasses)[0]] === 'function') {
for (const metaClass of Object.keys(this.metaClasses)) {
(this.metaClasses as any)[metaClass] = new (SCClasses as any)[metaClass]();
}

View File

@@ -1,5 +1,11 @@
# @openstapps/easy-ast
## 3.3.2
### Patch Changes
- 802a7a3f: Fixed docs generation
## 3.3.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/easy-ast",
"description": "Tool to easily handle TypeScript AST",
"version": "3.3.0",
"version": "3.3.2",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/core-tools.git",

View File

@@ -149,8 +149,8 @@ class LightweightDefinitionBuilder {
indexSignature.type,
),
indexSignatureType: this.lightweightTypeFromType(
this.typeChecker.getTypeFromTypeNode(indexSignature.parameters[0]?.type!),
indexSignature.parameters[0]?.type!,
this.typeChecker.getTypeFromTypeNode(indexSignature.parameters[0].type!),
indexSignature.parameters[0].type!,
),
}),
),
@@ -253,6 +253,6 @@ class LightweightDefinitionBuilder {
* Same as conversion, but generates a simple list of all definitions.
*/
convertToList(): LightweightDefinition[] {
return Object.values(this.convert()).flatMap(it => it['values']!);
return Object.values(this.convert()).flatMap(it => it.values);
}
}

View File

@@ -1,9 +0,0 @@
declare global {
namespace NodeJS {
interface ProcessEnv {
GITLAB_PRIVATE_TOKEN?: string;
}
}
}
export {};

View File

@@ -1,24 +0,0 @@
declare global {
namespace NodeJS {
interface ProcessEnv {
/**
* If set to true, invalid smtp configs will not throw an error
*/
ALLOW_NO_TRANSPORT?: 'true' | string;
SMTP_AUTH_USER?: string;
SMTP_AUTH_PASSWORD?: string;
SMTP_SENDER_MAIL?: string;
SMTP_SENDER_NAME?: string;
SMTP_HOST?: string;
SMTP_PORT?: string;
SMTP_CC?: string;
SMTP_RECIPIENTS?: string;
SMTP_SECURE?: 'true' | string;
STAPPS_LOG_LEVEL?: string;
STAPPS_EXIT_LEVEL?: string;
NODE_ENV?: string;
}
}
}
export {};