Compare commits

...

6 Commits

Author SHA1 Message Date
33181941ba feat: enable stricter typescript compiler options 2024-07-15 13:31:13 +02:00
7e779b738e feat: enable stricter type-checking 2024-07-15 13:28:56 +02:00
2a1a7a5d5b fix: docs generation 2024-07-09 14:30:46 +02:00
Jovan Krunić
a69b80d1d4 feat: library account adjustments
Closes #214
2024-07-04 16:40:37 +02:00
e2abc983ef fix: list item layout broken 2024-07-03 16:26:36 +02:00
913193abdb fix: elasticsearch integration spams errors 2024-07-02 17:49:38 +02:00
81 changed files with 287 additions and 211 deletions

View File

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

View File

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

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,7 +81,9 @@ 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

@@ -12,8 +12,9 @@
* 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

@@ -33,9 +33,9 @@ ion-item {
margin: var(--spacing-sm);
ion-thumbnail {
--ion-margin: var(--spacing-xs);
--size: 36px;
margin-block: auto;
margin: 0;
margin-inline: var(--spacing-md);
padding: 0;
}

View File

@@ -14,7 +14,7 @@
*/
import {Component, EventEmitter, Input, Output} from '@angular/core';
import {DocumentAction, PAIADocument, PAIADocumentStatus} from '../../../types';
import {DocumentAction, PAIADocument, PAIADocumentStatus, PAIADocumentVisualStatus} from '../../../types';
import {LibraryAccountService} from '../../library-account.service';
@Component({
@@ -27,12 +27,15 @@ export class PAIAItemComponent {
renewable: boolean;
visualStatus?: PAIADocumentVisualStatus;
constructor(private readonly libraryAccountService: LibraryAccountService) {}
@Input()
set item(value: PAIADocument) {
this._item = value;
void this.setRenewable();
this.visualStatus = this.getVisualStatus(Number(this.item.status));
}
get item(): PAIADocument {
@@ -56,4 +59,18 @@ export class PAIAItemComponent {
const isActive = await this.libraryAccountService.isActivePatron();
this.renewable = isActive && Number(this.item.status) === PAIADocumentStatus.Held;
}
private getVisualStatus(status: PAIADocumentStatus): PAIADocumentVisualStatus | undefined {
switch (status) {
case PAIADocumentStatus.Ordered: {
return {color: 'warning', status: status, statusText: 'ordered'};
}
case PAIADocumentStatus.Provided: {
return {color: 'success', status: status, statusText: 'ready'};
}
default: {
return undefined;
}
}
}
}

View File

@@ -14,10 +14,16 @@
-->
<ion-item>
<!-- TODO: text not selectable in Chrome, bugfix needed https://github.com/ionic-team/ionic-framework/issues/24956 -->
<ion-label class="ion-text-wrap">
@if (item.about) {
<h2 class="name">{{ item.about }}</h2>
<h2 class="name">
@if (visualStatus) {
<ion-badge [color]="visualStatus.color" slot="start">
{{ 'library.account.pages' + '.' + listName + '.' + visualStatus.statusText | translate }}
</ion-badge>
}
{{ item.about }}
</h2>
}
@for (property of propertiesToShow; track property) {
@if (item[property]) {

View File

@@ -12,3 +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/>.
*/
ion-badge {
vertical-align: bottom;
}

View File

@@ -35,23 +35,13 @@
@switch (activeSegment) {
@case ('orders') {
@for (hold of paiaDocuments; track hold) {
@if (toNumber(hold.status) === paiaDocumentStatus.Provided) {
<stapps-paia-item
[item]="hold"
[propertiesToShow]="['label', 'storage']"
(documentAction)="onDocumentAction($event)"
listName="holds"
>
</stapps-paia-item>
} @else {
<stapps-paia-item
[item]="hold"
[propertiesToShow]="['label']"
(documentAction)="onDocumentAction($event)"
listName="holds"
>
</stapps-paia-item>
}
<stapps-paia-item
[item]="hold"
[propertiesToShow]="['label', 'storage']"
(documentAction)="onDocumentAction($event)"
listName="holds"
>
</stapps-paia-item>
}
}
@case ('reservations') {

View File

@@ -88,3 +88,9 @@ export interface DocumentAction {
action: 'cancel' | 'renew';
doc: PAIADocument;
}
export interface PAIADocumentVisualStatus {
color: 'warning' | 'success';
status: PAIADocumentStatus;
statusText: 'ordered' | 'ready';
}

View File

@@ -336,13 +336,15 @@
"title": "Titel",
"about": "Mehr Informationen",
"label": "Signatur",
"starttime": "Übermittelt am",
"starttime": "Vorgemerkt am",
"endtime": "Abzuholen bis",
"storage": "Abholtheke",
"queue": "Position in der Warteschlange"
},
"holds": "Bestellungen",
"reservations": "Vormerkungen"
"reservations": "Vormerkungen",
"ordered": "Bestellt",
"ready": "Abholbereit"
},
"checked_out": {
"title": "Deine Ausleihen",

View File

@@ -336,13 +336,15 @@
"title": "Title",
"about": "More information",
"label": "Shelfmark",
"starttime": "Submitted at",
"starttime": "Reserved on",
"endtime": "Available for pickup until",
"storage": "Pick-up counter",
"storage": "Pickup counter",
"queue": "Position in the queue"
},
"holds": "orders",
"reservations": "reservations"
"reservations": "reservations",
"ordered": "Ordered",
"ready": "Ready for pickup"
},
"checked_out": {
"title": "checked out items",

View File

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

View File

@@ -13,6 +13,7 @@
"deploy": "dotenv -c -- turbo run deploy --concurrency=1",
"dev": "dotenv -c -- turbo run dev",
"docs": "dotenv -c -- turbo run docs && typedoc && mkdir docs/api && cp packages/core/lib/api-doc.html docs/api/index.html && cp packages/core/lib/openapi.json docs/api/openapi.json && cp -r packages/core/lib/schema docs/api/schema",
"docs:serve": "http-server docs -p 8080 -o",
"format": "dotenv -c -- turbo run format",
"format:fix": "dotenv -c -- turbo run format:fix",
"lint": "dotenv -c -- turbo run lint",
@@ -34,6 +35,7 @@
"deepmerge": "4.3.1",
"dotenv-cli": "7.2.1",
"glob": "10.3.10",
"http-server": "14.1.1",
"junit-report-merger": "6.0.3",
"prettier": "3.1.1",
"syncpack": "12.3.0",

10
packages/api-plugin/environment.d.ts vendored Normal file
View File

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

View File

@@ -175,13 +175,11 @@ 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

@@ -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 of Object.keys(preFlightRequest)) {
returnMultiSearchRequest[key].size = preFlightResponse[key].pagination.total;
for (const key in 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
*/
toString(): string {
override 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

@@ -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);
unexpected = unexpected || errorsPerFile[file]?.some(error => !error.expected) || false;
}
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,19 +117,21 @@ 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: {
@@ -142,8 +144,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,
@@ -153,7 +155,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

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

View File

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

View File

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

View File

@@ -79,7 +79,7 @@ export class SCEventMeta extends SCThingMeta implements SCMetaTranslations<SCEve
/**
* Translations of fields
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},

View File

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

View File

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

View File

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

View File

@@ -119,7 +119,7 @@ export class SCAcademicEventMeta extends SCThingMeta implements SCMetaTranslatio
/**
* Translations of fields
*/
fieldTranslations = {
override fieldTranslations = {
de: {
...new SCEventMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
@@ -143,7 +143,7 @@ export class SCAcademicEventMeta extends SCThingMeta implements SCMetaTranslatio
/**
* Translations of values of fields
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCAssessmentCategories,
@@ -152,7 +152,7 @@ export class SCAssessmentMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of values of fields
*/
fieldValueTranslations = {
override fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCAssessmentCategories,

View File

@@ -131,7 +131,7 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
/**
* Translations of fields
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCBuildingCategories,
@@ -117,7 +117,7 @@ export class SCBuildingMeta extends SCThingMeta implements SCMetaTranslations<SC
/**
* Translations of values of fields
*/
fieldValueTranslations = {
override fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCBuildingCategories,

View File

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

View File

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

View File

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

View File

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

View File

@@ -112,7 +112,7 @@ export class SCDateSeriesMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of fields
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
action: {

View File

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

View File

@@ -107,7 +107,7 @@ export class SCFloorMeta extends SCThingMeta implements SCMetaTranslations<SCFlo
/**
* Translations of fields
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
type: 'Ausweis',

View File

@@ -54,7 +54,7 @@ export interface SCJobPosting
}
export class SCJobPostingMeta extends SCThingMeta {
fieldTranslations = {
override fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta().fieldTranslations.de,
@@ -67,7 +67,7 @@ export class SCJobPostingMeta extends SCThingMeta {
},
};
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override fieldValueTranslations = {
de: {
...new SCCreativeWorkMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<

View File

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

View File

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

View File

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

View File

@@ -70,7 +70,7 @@ export class SCPublicationEventMeta extends SCThingMeta implements SCMetaTransla
/**
* Translations of fields
*/
fieldTranslations = {
override fieldTranslations = {
de: {
...new SCEventMeta().fieldTranslations.de,
locations: 'Erscheinungsorte',
@@ -86,7 +86,7 @@ export class SCPublicationEventMeta extends SCThingMeta implements SCMetaTransla
/**
* Translations of values of fields
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCSettingCategories,
@@ -149,7 +149,7 @@ export class SCSettingMeta extends SCThingMeta implements SCMetaTranslations<SCS
/**
* Translations of values of fields
*/
fieldValueTranslations = {
override fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCSettingCategories,

View File

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

View File

@@ -140,7 +140,7 @@ export class SCStudyModuleMeta extends SCThingMeta implements SCMetaTranslations
/**
* Translations of fields
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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
*/
fieldTranslations = {
override 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
*/
fieldValueTranslations = {
override 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

@@ -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

@@ -17,10 +17,8 @@ import {EasyAstSpecType} from '../easy-ast-spec-type.js';
import {LightweightDefinitionKind} from '../../src/index.js';
import {TypeFlags} from 'typescript';
// @ts-expect-error unused type
type TestTypeAlias = number | string;
// @ts-expect-error unused type
enum TestEnum {
Foo,
Bar,

View File

@@ -18,13 +18,9 @@ import {LightweightDefinitionKind} from '../../src/index.js';
interface Random {}
// @ts-expect-error unused type
type TestArrayGeneric = Array<string>;
// @ts-expect-error unused type
type TestArrayLiteral = number[];
// @ts-expect-error unused type
type TestArrayReferenceGeneric = Array<Random>;
// @ts-expect-error unused type
type TestArrayReferenceLiteral = Random[];
export const testConfig: EasyAstSpecType = {

View File

@@ -16,12 +16,10 @@
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
import {LightweightDefinitionKind} from '../../src/index.js';
// @ts-expect-error unused type
interface TestInterface {
foo: number;
}
// @ts-expect-error unused type
class TestClass {
bar: string = 'test';
}

View File

@@ -22,10 +22,8 @@ import {LightweightDefinitionKind} from '../../src/index.js';
* Class description
*
* More description
*
* @classTag classParameter1 classParameter2
*/
// @ts-expect-error unused type
interface TestInterface {
/**
* Property comment
@@ -33,7 +31,6 @@ interface TestInterface {
* Property description
*
* More description
*
* @propertyTag propertyParameter1 propertyParameter2
*/
foo: string;
@@ -45,10 +42,8 @@ interface TestInterface {
* Class description
*
* More description
*
* @classTag classParameter1 classParameter2
*/
// @ts-expect-error unused type
class TestClass {
/**
* Property comment
@@ -56,7 +51,6 @@ class TestClass {
* Property description
*
* More description
*
* @propertyTag propertyParameter1 propertyParameter2
*/
foo = 1;
@@ -68,10 +62,8 @@ class TestClass {
* Enum description
*
* More description
*
* @enumTag enumParameter1
*/
// @ts-expect-error unused type
enum TestAlias {}
export const testConfig: EasyAstSpecType = {

View File

@@ -20,7 +20,6 @@ interface Test1<T = number> {
foo: T;
}
// @ts-expect-error unused type
interface Test2 {
bar: Test1;
}

View File

@@ -17,13 +17,11 @@ import {EasyAstSpecType} from '../easy-ast-spec-type.js';
import {LightweightDefinitionKind} from '../../src/index.js';
import {TypeFlags} from 'typescript';
// @ts-expect-error unused type
enum TestAuto {
Foo,
Bar,
}
// @ts-expect-error unused type
enum TestSpecified {
YES = 'yes',
NO = 'no',

View File

@@ -18,7 +18,6 @@ import {LightweightDefinitionKind} from '../../src/index.js';
interface $Random {}
// @ts-expect-error unused type
interface Generics {
baz: Foo<number, $Random>;
}

View File

@@ -18,12 +18,10 @@ import {LightweightDefinitionKind} from '../../src/index.js';
interface $Random {}
// @ts-expect-error unused
interface IndexSignatureObject {
[key: string]: $Random;
}
// @ts-expect-error unused
interface IndexSignaturePrimitive {
[key: string]: number;
}

View File

@@ -26,7 +26,6 @@ interface $BaseInterface2 {
class $BaseClass {}
// @ts-expect-error unused
class InheritingClass extends $BaseClass implements $BaseInterface<number>, $BaseInterface2 {
bar: string = '';

View File

@@ -16,7 +16,6 @@
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
import {LightweightDefinitionKind} from '../../src/index.js';
// @ts-expect-error unused
interface NestedObject {
nested: {
deeplyNested: {

View File

@@ -17,7 +17,6 @@ import {EasyAstSpecType} from '../easy-ast-spec-type.js';
import {LightweightDefinitionKind} from '../../src/index.js';
import {TypeFlags} from 'typescript';
// @ts-expect-error unused
interface Test {
number_type: number;
string_type: string;

View File

@@ -16,7 +16,6 @@
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
import {LightweightDefinitionKind} from '../../src/index.js';
// @ts-expect-error unused
interface Foo<T extends Bar<string>> {
bar: T;
}

9
packages/gitlab-api/environment.d.ts vendored Normal file
View File

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

24
packages/logger/environment.d.ts vendored Normal file
View File

@@ -0,0 +1,24 @@
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 {};

30
pnpm-lock.yaml generated
View File

@@ -26,6 +26,9 @@ importers:
glob:
specifier: 10.3.10
version: 10.3.10
http-server:
specifier: 14.1.1
version: 14.1.1
junit-report-merger:
specifier: 6.0.3
version: 6.0.3
@@ -4659,22 +4662,23 @@ packages:
resolution: {integrity: sha512-0QZDBePnb5a+d76zjlMYq96IDf0AOuGP7JHugFUYlYwTC7rZvROuZSpoUsvpUjNH2CzMqWgNLIekIR6EHRMIQA==}
engines: {node: '>=14'}
dependencies:
'@elastic/transport': 8.3.2
'@elastic/transport': 8.7.0
tslib: 2.4.1
transitivePeerDependencies:
- supports-color
dev: false
/@elastic/transport@8.3.2:
resolution: {integrity: sha512-ZiBYRVPj6pwYW99fueyNU4notDf7ZPs7Ix+4T1btIJsKJmeaORIItIfs+0O7KV4vV+DcvyMhkY1FXQx7kQOODw==}
engines: {node: '>=14'}
/@elastic/transport@8.7.0:
resolution: {integrity: sha512-IqXT7a8DZPJtqP2qmX1I2QKmxYyN27kvSW4g6pInESE1SuGwZDp2FxHJ6W2kwmYOJwQdAt+2aWwzXO5jHo9l4A==}
engines: {node: '>=18'}
dependencies:
'@opentelemetry/api': 1.9.0
debug: 4.3.4(supports-color@8.1.1)
hpagent: 1.2.0
ms: 2.1.3
secure-json-parse: 2.7.0
tslib: 2.6.2
undici: 5.22.1
undici: 6.19.2
transitivePeerDependencies:
- supports-color
dev: false
@@ -6296,6 +6300,11 @@ packages:
- debug
dev: false
/@opentelemetry/api@1.9.0:
resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==}
engines: {node: '>=8.0.0'}
dev: false
/@pkgjs/parseargs@0.11.0:
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
@@ -8564,6 +8573,7 @@ packages:
engines: {node: '>=10.16.0'}
dependencies:
streamsearch: 1.1.0
dev: true
/bytes@3.0.0:
resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==}
@@ -11744,6 +11754,7 @@ packages:
peerDependenciesMeta:
debug:
optional: true
dev: false
/follow-redirects@1.15.6:
resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==}
@@ -12648,7 +12659,7 @@ packages:
engines: {node: '>=8.0.0'}
dependencies:
eventemitter3: 4.0.7
follow-redirects: 1.15.3
follow-redirects: 1.15.6
requires-port: 1.0.0
transitivePeerDependencies:
- debug
@@ -18214,6 +18225,7 @@ packages:
/streamsearch@1.1.0:
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
engines: {node: '>=10.0.0'}
dev: true
/streamx@2.15.1:
resolution: {integrity: sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==}
@@ -19481,6 +19493,12 @@ packages:
engines: {node: '>=14.0'}
dependencies:
busboy: 1.6.0
dev: true
/undici@6.19.2:
resolution: {integrity: sha512-JfjKqIauur3Q6biAtHJ564e3bWa8VvT+7cSiOJHFbX4Erv6CLGDpg8z+Fmg/1OI/47RA+GI2QZaF48SSaLvyBA==}
engines: {node: '>=18.17'}
dev: false
/undici@6.7.1:
resolution: {integrity: sha512-+Wtb9bAQw6HYWzCnxrPTMVEV3Q1QjYanI0E4q02ehReMuquQdLTEFEYbfs7hcImVYKcQkWSwT6buEmSVIiDDtQ==}