From b21833de407dfb63ade5087a24281614432e831e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Fri, 2 Jun 2023 16:41:25 +0200 Subject: [PATCH] refactor: split api into api, api-cli & api-plugin --- .syncpackrc.cjs | 8 +- backend/backend/package.json | 2 +- backend/backend/src/app.ts | 4 +- backend/backend/src/config.ts | 1 - backend/backend/src/middleware/prometheus.ts | 1 - .../src/notification/backend-transport.ts | 5 +- .../backend/src/notification/mail-queue.ts | 3 - backend/backend/src/routes/bulk-add-route.ts | 2 +- backend/backend/src/routes/bulk-done-route.ts | 2 +- backend/backend/src/routes/http-types.ts | 1 - .../src/routes/plugin-register-route.ts | 5 +- backend/backend/src/routes/route.ts | 1 - .../src/routes/virtual-plugin-route.ts | 3 +- backend/backend/src/storage/bulk-storage.ts | 9 +- backend/backend/src/storage/database.ts | 7 - .../src/storage/elasticsearch/aggregations.ts | 1 - .../storage/elasticsearch/elasticsearch.ts | 28 +- .../src/storage/elasticsearch/monitoring.ts | 5 - .../query/boost/boost-functions.ts | 3 +- .../query/boost/scoring-functions.ts | 3 +- .../src/storage/elasticsearch/query/filter.ts | 1 - .../query/filters/availability.ts | 3 +- .../elasticsearch/query/filters/boolean.ts | 1 - .../elasticsearch/query/filters/date-range.ts | 1 - .../elasticsearch/query/filters/distance.ts | 1 - .../elasticsearch/query/filters/geo.ts | 1 - .../query/filters/numeric-range.ts | 1 - .../elasticsearch/query/filters/value.ts | 1 - .../src/storage/elasticsearch/query/query.ts | 7 +- .../src/storage/elasticsearch/query/sort.ts | 1 - .../elasticsearch/query/sort/distance.ts | 1 - .../storage/elasticsearch/query/sort/ducet.ts | 1 - .../elasticsearch/query/sort/generic.ts | 1 - .../storage/elasticsearch/query/sort/price.ts | 2 - .../src/storage/elasticsearch/templating.ts | 3 +- .../types/elasticsearch-config.ts | 7 - .../src/storage/elasticsearch/util/alias.ts | 1 - .../src/storage/elasticsearch/util/index.ts | 6 +- .../elasticsearch/util/no-undefined.ts | 2 +- backend/proxy/package.json | 2 +- backend/proxy/src/main.ts | 25 +- configuration/eslint-config/index.js | 6 +- configuration/eslint-config/package.json | 16 +- configuration/projectmanagement/package.json | 4 +- configuration/projectmanagement/src/common.ts | 1 - .../src/tasks/get-used-version.ts | 2 - .../projectmanagement/src/tasks/remind.ts | 9 +- .../projectmanagement/src/tasks/report.ts | 18 +- .../projectmanagement/src/tasks/tidy.ts | 14 +- .../projectmanagement/src/tasks/unlabel.ts | 1 - examples/minimal-connector/package.json | 4 +- examples/minimal-connector/src/common.ts | 3 - examples/minimal-connector/src/connector.ts | 2 - .../src/minimal-connector.ts | 1 - examples/minimal-plugin/package.json | 3 +- examples/minimal-plugin/src/app.ts | 3 +- .../src/plugin/minimal-plugin.ts | 4 +- .../src/plugin/protocol/request.ts | 1 - .../src/plugin/protocol/response.ts | 1 - frontend/app/.eslintrc.json | 1 + frontend/app/package.json | 3 +- .../app/modules/catalog/catalog.component.ts | 2 +- .../app/modules/data/data.provider.spec.ts | 2 +- .../app/modules/hebis/daia-data.provider.ts | 4 +- package.json | 8 +- packages/{api => api-cli}/Dockerfile | 0 packages/api-cli/LICENSE | 200 +++ packages/api-cli/README.md | 63 + packages/{api => api-cli}/app.js | 0 packages/api-cli/package.json | 80 + packages/{api => api-cli}/src/app.ts | 2 +- packages/{api => api-cli}/src/copy.ts | 21 +- packages/{api => api-cli}/src/e2e.ts | 4 +- packages/{api => api-cli}/test/copy.spec.ts | 34 +- packages/{api => api-cli}/test/e2e.spec.ts | 22 +- packages/api-cli/tsconfig.json | 3 + packages/api-plugin/LICENSE | 200 +++ packages/api-plugin/README.md | 0 packages/api-plugin/package.json | 82 + packages/api-plugin/src/index.ts | 2 + .../{api => api-plugin}/src/plugin-client.ts | 4 +- packages/{api => api-plugin}/src/plugin.ts | 10 +- .../test/plugin-client.spec.ts | 3 +- .../plugin-resources/test-plugin-response.ts | 0 .../test/plugin-resources/test-plugin.ts | 4 +- .../{api => api-plugin}/test/plugin.spec.ts | 28 +- packages/api-plugin/tsconfig.json | 3 + packages/api/.editorconfig | 15 - packages/api/.eslintignore | 2 - packages/api/.eslintrc.json | 3 - packages/api/.gitignore | 91 - packages/api/.npmignore | 11 - packages/api/README.md | 62 +- packages/api/package.json | 39 +- packages/api/src/bulk.ts | 2 - packages/api/src/client.ts | 19 +- packages/api/src/connector-client.ts | 33 +- packages/api/src/errors.ts | 7 +- packages/api/src/http-client-interface.ts | 1 - packages/api/src/http-client.ts | 73 +- packages/api/src/index.ts | 4 - packages/api/test/bulk.spec.ts | 15 +- packages/api/test/connector-client.spec.ts | 34 +- packages/api/test/http-client.spec.ts | 65 +- packages/collection-utils/package.json | 2 +- packages/collection-utils/src/chunk.ts | 1 - packages/core-tools/package.json | 2 +- packages/core-tools/src/app.ts | 2 +- packages/core-tools/src/common.ts | 1 - packages/core-tools/src/routes.ts | 4 +- packages/core-tools/src/schema.ts | 2 - packages/core-tools/src/uml/create-diagram.ts | 8 +- packages/core-tools/src/util/io.ts | 2 +- packages/core-tools/src/validate.ts | 6 - packages/core/package.json | 4 +- packages/core/src/config/authorization.ts | 2 - packages/core/src/config/file.ts | 1 - packages/core/src/general/i18n.ts | 6 - packages/core/src/general/map.ts | 2 - packages/core/src/general/time.ts | 3 - packages/core/src/general/uuid.ts | 1 - packages/core/src/guards.ts | 5 - packages/core/src/protocol/error.ts | 2 - .../protocol/errors/internal-server-error.ts | 2 - .../src/protocol/errors/method-not-allowed.ts | 2 - .../core/src/protocol/errors/not-found.ts | 2 - .../errors/parameters-not-acceptable.ts | 2 - .../errors/plugin-already-registered.ts | 2 - .../errors/plugin-registering-failed.ts | 2 - .../protocol/errors/request-body-too-large.ts | 2 - .../core/src/protocol/errors/syntax-error.ts | 2 - .../src/protocol/errors/too-many-requests.ts | 2 - .../protocol/errors/unsupported-media-type.ts | 2 - .../core/src/protocol/errors/validation.ts | 2 - packages/core/src/protocol/route.ts | 1 - .../src/protocol/routes/book-availability.ts | 2 - packages/core/src/protocol/routes/bulk-add.ts | 2 - .../core/src/protocol/routes/bulk-done.ts | 2 - .../core/src/protocol/routes/bulk-request.ts | 2 - packages/core/src/protocol/routes/feedback.ts | 2 - packages/core/src/protocol/routes/index.ts | 2 - .../src/protocol/routes/plugin-register.ts | 2 - packages/core/src/protocol/routes/rating.ts | 2 - .../core/src/protocol/routes/search-multi.ts | 2 - packages/core/src/protocol/routes/search.ts | 2 - .../core/src/protocol/routes/thing-update.ts | 2 - .../core/src/protocol/search/filters/range.ts | 6 - .../src/things/abstract/academic-degree.ts | 1 - .../core/src/things/abstract/academic-term.ts | 5 - .../core/src/things/abstract/creative-work.ts | 6 - packages/core/src/things/abstract/event.ts | 2 - packages/core/src/things/abstract/place.ts | 7 - .../abstract/thing-that-accepts-payments.ts | 1 - .../abstract/thing-that-can-be-offered.ts | 5 - .../things/abstract/thing-with-categories.ts | 7 - packages/core/src/things/abstract/thing.ts | 9 - packages/core/src/things/academic-event.ts | 5 - packages/core/src/things/article.ts | 3 - packages/core/src/things/assessment.ts | 3 - packages/core/src/things/book.ts | 3 - packages/core/src/things/building.ts | 2 - packages/core/src/things/catalog.ts | 2 - packages/core/src/things/contact-point.ts | 6 - packages/core/src/things/course-of-study.ts | 3 - packages/core/src/things/date-series.ts | 4 - packages/core/src/things/diff.ts | 1 - packages/core/src/things/dish.ts | 14 - packages/core/src/things/favorite.ts | 1 - packages/core/src/things/floor.ts | 3 - packages/core/src/things/message.ts | 5 - packages/core/src/things/organization.ts | 1 - packages/core/src/things/periodical.ts | 2 - packages/core/src/things/person.ts | 13 - packages/core/src/things/point-of-interest.ts | 1 - packages/core/src/things/publication-event.ts | 1 - packages/core/src/things/room.ts | 4 - packages/core/src/things/semester.ts | 2 - packages/core/src/things/setting.ts | 3 - packages/core/src/things/sport-course.ts | 1 - packages/core/src/things/study-module.ts | 4 - packages/core/src/things/ticket.ts | 2 - packages/core/src/things/todo.ts | 2 - packages/core/src/things/tour.ts | 11 - packages/core/src/things/video.ts | 10 - packages/core/src/translator.ts | 13 - packages/easy-ast/package.json | 2 +- packages/easy-ast/src/easy-ast.ts | 2 - packages/es-mapping-generator/src/app.ts | 6 +- .../src/config/typemap.ts | 2 +- packages/es-mapping-generator/src/mapping.ts | 75 +- .../src/project-reflection.ts | 4 +- .../src/types/aggregation.ts | 1 - .../test/mapping-model/map-agg-test.ts | 8 +- packages/gitlab-api/package.json | 4 +- packages/gitlab-api/src/api.ts | 32 +- packages/logger/package.json | 2 +- packages/logger/src/common.ts | 6 +- packages/logger/src/logger.ts | 24 +- packages/logger/src/smtp.ts | 36 +- packages/logger/src/transformation.ts | 1 - .../src/transformations/add-log-level.ts | 1 - .../logger/src/transformations/colorize.ts | 2 - .../logger/src/transformations/timestamp.ts | 1 - packages/logger/src/transport.ts | 1 - pnpm-lock.yaml | 1471 +++++++++++------ 205 files changed, 1981 insertions(+), 1492 deletions(-) rename packages/{api => api-cli}/Dockerfile (100%) create mode 100644 packages/api-cli/LICENSE create mode 100644 packages/api-cli/README.md rename packages/{api => api-cli}/app.js (100%) create mode 100644 packages/api-cli/package.json rename packages/{api => api-cli}/src/app.ts (98%) rename packages/{api => api-cli}/src/copy.ts (84%) rename packages/{api => api-cli}/src/e2e.ts (97%) rename packages/{api => api-cli}/test/copy.spec.ts (84%) rename packages/{api => api-cli}/test/e2e.spec.ts (88%) create mode 100644 packages/api-cli/tsconfig.json create mode 100644 packages/api-plugin/LICENSE create mode 100644 packages/api-plugin/README.md create mode 100644 packages/api-plugin/package.json create mode 100644 packages/api-plugin/src/index.ts rename packages/{api => api-plugin}/src/plugin-client.ts (97%) rename packages/{api => api-plugin}/src/plugin.ts (97%) rename packages/{api => api-plugin}/test/plugin-client.spec.ts (96%) rename packages/{api => api-plugin}/test/plugin-resources/test-plugin-response.ts (100%) rename packages/{api => api-plugin}/test/plugin-resources/test-plugin.ts (89%) rename packages/{api => api-plugin}/test/plugin.spec.ts (89%) create mode 100644 packages/api-plugin/tsconfig.json delete mode 100644 packages/api/.editorconfig delete mode 100644 packages/api/.eslintignore delete mode 100644 packages/api/.eslintrc.json delete mode 100644 packages/api/.gitignore delete mode 100644 packages/api/.npmignore diff --git a/.syncpackrc.cjs b/.syncpackrc.cjs index 8f60385c..d58ff634 100644 --- a/.syncpackrc.cjs +++ b/.syncpackrc.cjs @@ -55,11 +55,17 @@ const config = { packages: ['**'], pinVersion: 'workspace:*', }, - { + /*{ label: 'Packages should be synced to app', dependencies: ['typescript', 'ts-node'], packages: ['**'], snapTo: ['@openstapps/app'], + },*/ + { + label: 'App may have some dependency exceptions', + dependencies: ['typescript', '@typescript-eslint/**', 'eslint**'], + packages: ['@openstapps/app'], + isIgnored: true, }, ], }; diff --git a/backend/backend/package.json b/backend/backend/package.json index d192d13a..08ab49f1 100644 --- a/backend/backend/package.json +++ b/backend/backend/package.json @@ -90,7 +90,7 @@ "sinon-express-mock": "2.2.1", "supertest": "6.3.3", "tsup": "6.7.0", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "tsup": { "entry": [ diff --git a/backend/backend/src/app.ts b/backend/backend/src/app.ts index b26a65e3..ea4820bc 100644 --- a/backend/backend/src/app.ts +++ b/backend/backend/src/app.ts @@ -167,12 +167,12 @@ export async function configureApp(app: Express, databases: {[name: string]: Dat const database = new databases[backendConfig.internal.database.name]( backendConfig, // mailQueue - typeof mailer !== 'undefined' && backendConfig.internal.monitoring ? new MailQueue(mailer) : undefined, + mailer !== undefined && backendConfig.internal.monitoring ? new MailQueue(mailer) : undefined, ); await database.init(); - if (typeof database === 'undefined') { + if (database === undefined) { throw new TypeError('No implementation for configured database found. Please check your configuration.'); } diff --git a/backend/backend/src/config.ts b/backend/backend/src/config.ts index 5933b3ad..c187654b 100644 --- a/backend/backend/src/config.ts +++ b/backend/backend/src/config.ts @@ -8,7 +8,6 @@ const configPath = 'config'; /** * Creates a config loader - * * @param moduleName the name of the config file (module) */ function configLoader(moduleName: string): PublicExplorer { diff --git a/backend/backend/src/middleware/prometheus.ts b/backend/backend/src/middleware/prometheus.ts index d4ff66d7..c86d8478 100644 --- a/backend/backend/src/middleware/prometheus.ts +++ b/backend/backend/src/middleware/prometheus.ts @@ -23,7 +23,6 @@ import path from 'path'; * This function tries to configure the new instance with JSON read from * `./conf/prometheus.json`. When this fails an instance configured with * default options is returned. - * * @returns express.Express */ export function getPrometheusMiddleware(): express_prom_bundle.Middleware { diff --git a/backend/backend/src/notification/backend-transport.ts b/backend/backend/src/notification/backend-transport.ts index 8584c56e..f47bd9a6 100644 --- a/backend/backend/src/notification/backend-transport.ts +++ b/backend/backend/src/notification/backend-transport.ts @@ -17,7 +17,6 @@ import {Logger, SMTP, Transport, VerifiableTransport} from '@openstapps/logger'; /** * Provides information if a transport is a verifiable transport - * * @param instance A transport that needs to be checked */ export function isTransportWithVerification(instance: Transport): instance is VerifiableTransport { @@ -56,7 +55,7 @@ export class BackendTransport { * Provides instance of a backend transport */ public static getInstance(): BackendTransport { - if (typeof BackendTransport._instance !== 'undefined') { + if (BackendTransport._instance !== undefined) { return BackendTransport._instance; } @@ -86,7 +85,7 @@ export class BackendTransport { } } - if (typeof this.transport !== 'undefined' && isTransportWithVerification(this.transport)) { + if (this.transport !== undefined && isTransportWithVerification(this.transport)) { void this.verifyTransport(this.transport); } } diff --git a/backend/backend/src/notification/mail-queue.ts b/backend/backend/src/notification/mail-queue.ts index 54717593..16362665 100644 --- a/backend/backend/src/notification/mail-queue.ts +++ b/backend/backend/src/notification/mail-queue.ts @@ -50,7 +50,6 @@ export class MailQueue { /** * Creates a mail queue - * * @param transport Transport which is used for sending mails */ constructor(private readonly transport: SMTP) { @@ -67,7 +66,6 @@ export class MailQueue { /** * Adds a mail into the queue so it gets send when the queue is ready - * * @param mail Information required for sending a mail */ private async addToQueue(mail: MailOptions) { @@ -99,7 +97,6 @@ export class MailQueue { /** * Push a mail into the queue so it gets send when the queue is ready - * * @param mail Information required for sending a mail */ public async push(mail: MailOptions) { diff --git a/backend/backend/src/routes/bulk-add-route.ts b/backend/backend/src/routes/bulk-add-route.ts index 147b3f8e..edb64038 100644 --- a/backend/backend/src/routes/bulk-add-route.ts +++ b/backend/backend/src/routes/bulk-add-route.ts @@ -33,7 +33,7 @@ export const bulkAddRouter = createRoute( const bulkMemory: BulkStorage = app.get('bulk'); const bulk = bulkMemory.read(parameters.UID); - if (typeof bulk === 'undefined') { + if (bulk === undefined) { Logger.warn(`Bulk with ${parameters.UID} not found.`); throw new SCNotFoundErrorResponse(isTestEnvironment); } diff --git a/backend/backend/src/routes/bulk-done-route.ts b/backend/backend/src/routes/bulk-done-route.ts index e8bd8adb..336bfd17 100644 --- a/backend/backend/src/routes/bulk-done-route.ts +++ b/backend/backend/src/routes/bulk-done-route.ts @@ -38,7 +38,7 @@ export const bulkDoneRouter = createRoute const bulkMemory: BulkStorage = app.get('bulk'); const bulk = bulkMemory.read(parameters.UID); - if (typeof bulk === 'undefined') { + if (bulk === undefined) { Logger.warn(`Bulk with ${parameters.UID} not found.`); throw new SCNotFoundErrorResponse(isTestEnvironment); } diff --git a/backend/backend/src/routes/http-types.ts b/backend/backend/src/routes/http-types.ts index 63d8ea2a..00cf1ced 100644 --- a/backend/backend/src/routes/http-types.ts +++ b/backend/backend/src/routes/http-types.ts @@ -46,7 +46,6 @@ export type HTTPVerb = (typeof httpVerbs)[number]; /** * Provides information if a text (representing a method) is an HTTP verb - * * @param method A text (representing a method) to check */ export function isHttpMethod(method: string): method is HTTPVerb { diff --git a/backend/backend/src/routes/plugin-register-route.ts b/backend/backend/src/routes/plugin-register-route.ts index f6fc6ad0..dc96fac2 100644 --- a/backend/backend/src/routes/plugin-register-route.ts +++ b/backend/backend/src/routes/plugin-register-route.ts @@ -39,7 +39,6 @@ export const pluginRegisterRouter = createRoute(pluginRegisterRouteModel, plugin /** * Handles requests on route for registering plugins - * * @param request Request received for registering or unregistering a plugin * @param _app Express application */ @@ -59,7 +58,6 @@ export async function pluginRegisterHandler( /** * Adds a plugin to the list (map) of registered plugins - * * @param plugin Meta data of the plugin */ function addPlugin(plugin: SCPluginMetaData): SCPluginRegisterResponse { @@ -81,7 +79,7 @@ function addPlugin(plugin: SCPluginMetaData): SCPluginRegisterResponse { // it's a new plugin so it can be added to the map of plugins plugins.set(plugin.route, plugin); // add plugin info to app config - if (typeof backendConfig.app.features.plugins === 'undefined') { + if (backendConfig.app.features.plugins === undefined) { backendConfig.app.features.plugins = {}; } backendConfig.app.features.plugins[plugin.name] = {urlPath: plugin.route}; @@ -94,7 +92,6 @@ function addPlugin(plugin: SCPluginMetaData): SCPluginRegisterResponse { /** * Removes a plugin from the list (map) of registered plugins using the provided route - * * @param route Route of the plugin which needs to be unregistered */ function removePlugin(route: string): SCPluginRegisterResponse { diff --git a/backend/backend/src/routes/route.ts b/backend/backend/src/routes/route.ts index 57c8170b..01280bba 100644 --- a/backend/backend/src/routes/route.ts +++ b/backend/backend/src/routes/route.ts @@ -31,7 +31,6 @@ import {isHttpMethod} from './http-types.js'; * * The given router performs a request and response validation, sets status codes and checks if the given handler * only returns errors that are allowed for the client to see - * * @param routeClass Model of a route * @param handler Implements the logic of the route */ diff --git a/backend/backend/src/routes/virtual-plugin-route.ts b/backend/backend/src/routes/virtual-plugin-route.ts index 22b93d4d..a96bdf80 100644 --- a/backend/backend/src/routes/virtual-plugin-route.ts +++ b/backend/backend/src/routes/virtual-plugin-route.ts @@ -22,7 +22,6 @@ import {backendConfig} from '../config.js'; /** * Generic route function used to proxy actual requests to plugins - * * @param request The request for a plugin resource * @param plugin Meta data of the plugin * @throws {SCInternalServerErrorResponse} On request/response validation or response from the plugin errors @@ -35,7 +34,7 @@ export async function virtualPluginRoute(request: Request, plugin: SCPluginMetaD throw new SCValidationErrorResponse(requestValidation.errors, isTestEnvironment); } // send the request to the plugin (forward the body) and save the response - const response = await got.post(plugin.route.replace(/^\//gi, ''), { + const response = await got.post(plugin.route.replaceAll(/^\//gi, ''), { prefixUrl: plugin.address, json: request.body, timeout: { diff --git a/backend/backend/src/storage/bulk-storage.ts b/backend/backend/src/storage/bulk-storage.ts index d1acb8b0..48211d3b 100644 --- a/backend/backend/src/storage/bulk-storage.ts +++ b/backend/backend/src/storage/bulk-storage.ts @@ -69,7 +69,6 @@ export class Bulk implements SCBulkRequest { /** * Creates a new bulk process - * * @param request Data needed for requesting a bulk */ constructor(request: SCBulkRequest) { @@ -97,7 +96,6 @@ export class BulkStorage { /** * Creates a new BulkStorage - * * @param database the database that is controlled by this bulk storage */ constructor(public database: Database) { @@ -116,7 +114,6 @@ export class BulkStorage { /** * Saves a bulk process and assigns to it a user-defined ttl (time-to-live) - * * @param bulk the bulk process to save * @returns the bulk process that was saved */ @@ -132,7 +129,6 @@ export class BulkStorage { /** * Create and save a new bulk process - * * @param bulkRequest a request for a new bulk process * @returns a promise that contains the new bulk process */ @@ -151,14 +147,13 @@ export class BulkStorage { /** * Delete a bulk process - * * @param uid uid of the bulk process * @returns a promise that contains the deleted bulk process */ public async delete(uid: string): Promise { const bulk = this.read(uid); - if (typeof bulk === 'undefined') { + if (bulk === undefined) { throw new TypeError(`Bulk that should be deleted was not found. UID was "${uid}"`); } @@ -173,7 +168,6 @@ export class BulkStorage { /** * Update an old bulk process (replace it with the new one) - * * @param bulk new bulk process * @returns an empty promise */ @@ -189,7 +183,6 @@ export class BulkStorage { /** * Read an existing bulk process - * * @param uid uid of the bulk process * @returns a promise that contains a bulk */ diff --git a/backend/backend/src/storage/database.ts b/backend/backend/src/storage/database.ts index 643bf9da..770088b7 100644 --- a/backend/backend/src/storage/database.ts +++ b/backend/backend/src/storage/database.ts @@ -30,7 +30,6 @@ export interface Database { * Gets called if a bulk was created * * The database should - * * @param bulk A bulk to be created */ bulkCreated(bulk: Bulk): Promise; @@ -39,7 +38,6 @@ export interface Database { * Gets called if a bulk expires * * The database should delete all data that is associtated with this bulk - * * @param bulk A bulk which data needs to be removed */ bulkExpired(bulk: Bulk): Promise; @@ -49,14 +47,12 @@ export interface Database { * * If the database holds a bulk with the same type and source as the given * bulk it should be replaced by the given one - * * @param bulk A new bulk whose data should be saved instead of the data of the old bulk */ bulkUpdated(bulk: Bulk): Promise; /** * Get a single document - * * @param uid Unique identifier of the document */ get(uid: SCUuid): Promise; @@ -68,7 +64,6 @@ export interface Database { /** * Add a thing to an existing bulk - * * @param thing A StAppsCore thing to be added * @param bulk A bulk to which the thing should be added */ @@ -78,14 +73,12 @@ export interface Database { * Replace an existing thing in any Bulk * * Currently it is not possible to put an non-existing object - * * @param thing A StAppsCore thing to be added to a bulk */ put(thing: SCThings): Promise; /** * Search for things - * * @param params Parameters which form a search query to search the backend data */ search(parameters: SCSearchQuery): Promise; diff --git a/backend/backend/src/storage/elasticsearch/aggregations.ts b/backend/backend/src/storage/elasticsearch/aggregations.ts index f60cc352..c32365ed 100644 --- a/backend/backend/src/storage/elasticsearch/aggregations.ts +++ b/backend/backend/src/storage/elasticsearch/aggregations.ts @@ -23,7 +23,6 @@ import {SCFacet, SCThingType} from '@openstapps/core'; /** * Parses elasticsearch aggregations (response from es) to facets for the app - * * @param aggregationResponse - aggregations response from elasticsearch */ export function parseAggregations( diff --git a/backend/backend/src/storage/elasticsearch/elasticsearch.ts b/backend/backend/src/storage/elasticsearch/elasticsearch.ts index 49c44611..2a9b8181 100644 --- a/backend/backend/src/storage/elasticsearch/elasticsearch.ts +++ b/backend/backend/src/storage/elasticsearch/elasticsearch.ts @@ -81,15 +81,11 @@ export class Elasticsearch implements Database { /** * Create a new interface for elasticsearch - * * @param config an assembled config file * @param mailQueue a mail queue for monitoring */ constructor(private readonly config: SCConfigFile, mailQueue?: MailQueue) { - if ( - typeof config.internal.database === 'undefined' || - typeof config.internal.database.version !== 'string' - ) { + if (config.internal.database === undefined || typeof config.internal.database.version !== 'string') { throw new TypeError('Database version is undefined. Check your config file'); } @@ -144,7 +140,6 @@ export class Elasticsearch implements Database { /** * Provides an elasticsearch object using containing thing's UID - * * @param uid an UID to use for the search * @returns an elasticsearch object containing the thing */ @@ -188,7 +183,6 @@ export class Elasticsearch implements Database { /** * Should be called when a new bulk was created. Creates a new index and applies the mapping to the index - * * @param bulk the bulk process that was created */ public async bulkCreated(bulk: Bulk): Promise { @@ -208,7 +202,6 @@ export class Elasticsearch implements Database { /** * Should be called when a bulk process is expired. The index that was created with this bulk gets deleted - * * @param bulk the bulk process that is expired */ public async bulkExpired(bulk: Bulk): Promise { @@ -227,7 +220,6 @@ export class Elasticsearch implements Database { /** * Should be called when a bulk process is updated (replaced by a newer bulk). This will replace the old * index and publish all data that was indexed in the new instead - * * @param bulk the new bulk process that should replace the old one with the same type and source */ public async bulkUpdated(bulk: Bulk): Promise { @@ -262,13 +254,12 @@ export class Elasticsearch implements Database { /** * Gets an SCThing from all indexed data - * * @param uid uid of an SCThing */ public async get(uid: SCUuid): Promise { const object = await this.getObject(uid); - if (typeof object?._source === 'undefined') { + if (object?._source === undefined) { throw new TypeError('Item not found.'); } @@ -281,8 +272,8 @@ export class Elasticsearch implements Database { public async init(retryOptions: Partial> = {}): Promise { const monitoringConfiguration = this.config.internal.monitoring; - if (typeof monitoringConfiguration !== 'undefined') { - if (typeof this.mailQueue === 'undefined') { + if (monitoringConfiguration !== undefined) { + if (this.mailQueue === undefined) { throw new TypeError( 'Monitoring is defined, but MailQueue is undefined. A MailQueue is obligatory for monitoring.', ); @@ -296,7 +287,6 @@ export class Elasticsearch implements Database { /** * Add an item to an index - * * @param object the SCThing to add to the index * @param bulk the bulk process which item belongs to */ @@ -341,13 +331,12 @@ export class Elasticsearch implements Database { /** * Put (update) an existing item - * * @param object SCThing to put */ public async put(object: SCThings): Promise { const item = await this.getObject(object.uid); - if (typeof item !== 'undefined') { + if (item !== undefined) { await this.client.update({ body: { doc: object, @@ -364,11 +353,10 @@ export class Elasticsearch implements Database { /** * Search all indexed data - * * @param parameters search query */ public async search(parameters: SCSearchQuery): Promise { - if (typeof this.config.internal.database === 'undefined') { + if (this.config.internal.database === undefined) { throw new TypeError('Database is undefined. You have to configure the query build'); } @@ -388,7 +376,7 @@ export class Elasticsearch implements Database { index: ACTIVE_INDICES_ALIAS, allow_no_indices: true, size: parameters.size, - sort: typeof parameters.sort === 'undefined' ? undefined : buildSort(parameters.sort), + sort: parameters.sort === undefined ? undefined : buildSort(parameters.sort), }); return { @@ -400,7 +388,7 @@ export class Elasticsearch implements Database { }) .filter(noUndefined), facets: - typeof response.aggregations === 'undefined' + response.aggregations === undefined ? [] : parseAggregations(response.aggregations as Record), pagination: { diff --git a/backend/backend/src/storage/elasticsearch/monitoring.ts b/backend/backend/src/storage/elasticsearch/monitoring.ts index c02a63fc..37683fa7 100644 --- a/backend/backend/src/storage/elasticsearch/monitoring.ts +++ b/backend/backend/src/storage/elasticsearch/monitoring.ts @@ -29,7 +29,6 @@ import {MailQueue} from '../../notification/mail-queue.js'; /** * Check if the given condition fails on the given number of results and the condition - * * @param condition condition * @param total number of results */ @@ -46,7 +45,6 @@ function conditionFails( /** * Check if the min condition fails - * * @param minimumLength Minimal length allowed * @param total Number of results */ @@ -56,7 +54,6 @@ function minConditionFails(minimumLength: number, total: number) { /** * Check if the max condition fails - * * @param maximumLength Maximal length allowed * @param total Number of results */ @@ -66,7 +63,6 @@ function maxConditionFails(maximumLength: number, total: number) { /** * Run all the given actions - * * @param actions actions to perform * @param watcherName name of watcher that wants to perform them * @param triggerName name of trigger that triggered the watcher @@ -99,7 +95,6 @@ function runActions( /** * Set up the triggers for the configured watchers - * * @param monitoringConfig configuration of the monitoring * @param esClient elasticsearch client * @param mailQueue mailQueue for mail actions diff --git a/backend/backend/src/storage/elasticsearch/query/boost/boost-functions.ts b/backend/backend/src/storage/elasticsearch/query/boost/boost-functions.ts index 0648c6b7..2ce7cf5d 100644 --- a/backend/backend/src/storage/elasticsearch/query/boost/boost-functions.ts +++ b/backend/backend/src/storage/elasticsearch/query/boost/boost-functions.ts @@ -18,7 +18,6 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js'; /** * Creates boost functions for all type boost configurations - * * @param boostingTypes Array of type boosting configurations */ export function buildFunctionsForBoostingTypes( @@ -38,7 +37,7 @@ export function buildFunctionsForBoostingTypes( weight: boostingForOneSCType.factor, }); - if (typeof boostingForOneSCType.fields !== 'undefined') { + if (boostingForOneSCType.fields !== undefined) { const fields = boostingForOneSCType.fields; for (const fieldName in boostingForOneSCType.fields) { diff --git a/backend/backend/src/storage/elasticsearch/query/boost/scoring-functions.ts b/backend/backend/src/storage/elasticsearch/query/boost/scoring-functions.ts index 8228880e..c7dfe1d5 100644 --- a/backend/backend/src/storage/elasticsearch/query/boost/scoring-functions.ts +++ b/backend/backend/src/storage/elasticsearch/query/boost/scoring-functions.ts @@ -18,7 +18,6 @@ import {buildFunctionsForBoostingTypes} from './boost-functions.js'; /** * Builds scoring functions from boosting config - * * @param boostings Backend boosting configuration for contexts and types * @param context The context of the app from where the search was initiated */ @@ -29,7 +28,7 @@ export function buildScoringFunctions( // default context let functions = buildFunctionsForBoostingTypes(boostings['default' as SCSearchContext]); - if (typeof context !== 'undefined' && context !== 'default') { + if (context !== undefined && context !== 'default') { // specific context provided, extend default context with additional boosts functions = [...functions, ...buildFunctionsForBoostingTypes(boostings[context])]; } diff --git a/backend/backend/src/storage/elasticsearch/query/filter.ts b/backend/backend/src/storage/elasticsearch/query/filter.ts index 430d1cab..447c8758 100644 --- a/backend/backend/src/storage/elasticsearch/query/filter.ts +++ b/backend/backend/src/storage/elasticsearch/query/filter.ts @@ -24,7 +24,6 @@ import {buildValueFilter} from './filters/value.js'; /** * Converts Array of Filters to elasticsearch query-syntax - * * @param filter A search filter for the retrieval of the data */ export function buildFilter(filter: SCSearchFilter): QueryDslQueryContainer { diff --git a/backend/backend/src/storage/elasticsearch/query/filters/availability.ts b/backend/backend/src/storage/elasticsearch/query/filters/availability.ts index 95ec8753..e4197e7a 100644 --- a/backend/backend/src/storage/elasticsearch/query/filters/availability.ts +++ b/backend/backend/src/storage/elasticsearch/query/filters/availability.ts @@ -17,14 +17,13 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js'; /** * Converts an availability filter to elasticsearch syntax - * * @param filter A search filter for the retrieval of the data */ export function buildAvailabilityFilter( filter: SCSearchAvailabilityFilter, ): QueryDslSpecificQueryContainer<'range'> { const scope = filter.arguments.scope?.charAt(0) ?? 's'; - const time = typeof filter.arguments.time === 'undefined' ? 'now' : `${filter.arguments.time}||`; + const time = filter.arguments.time === undefined ? 'now' : `${filter.arguments.time}||`; return { range: { diff --git a/backend/backend/src/storage/elasticsearch/query/filters/boolean.ts b/backend/backend/src/storage/elasticsearch/query/filters/boolean.ts index ce8cc4bb..13eaa153 100644 --- a/backend/backend/src/storage/elasticsearch/query/filters/boolean.ts +++ b/backend/backend/src/storage/elasticsearch/query/filters/boolean.ts @@ -19,7 +19,6 @@ import {buildFilter} from '../filter.js'; /** * Converts a boolean filter to elasticsearch syntax - * * @param filter A search filter for the retrieval of the data */ export function buildBooleanFilter(filter: SCSearchBooleanFilter): QueryDslSpecificQueryContainer<'bool'> { diff --git a/backend/backend/src/storage/elasticsearch/query/filters/date-range.ts b/backend/backend/src/storage/elasticsearch/query/filters/date-range.ts index 45f9201e..a9020c94 100644 --- a/backend/backend/src/storage/elasticsearch/query/filters/date-range.ts +++ b/backend/backend/src/storage/elasticsearch/query/filters/date-range.ts @@ -18,7 +18,6 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js'; /** * Converts a date range filter to elasticsearch syntax - * * @param filter A search filter for the retrieval of the data */ export function buildDateRangeFilter( diff --git a/backend/backend/src/storage/elasticsearch/query/filters/distance.ts b/backend/backend/src/storage/elasticsearch/query/filters/distance.ts index 2ec9aa36..3c1fd0ff 100644 --- a/backend/backend/src/storage/elasticsearch/query/filters/distance.ts +++ b/backend/backend/src/storage/elasticsearch/query/filters/distance.ts @@ -18,7 +18,6 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js'; /** * Converts a distance filter to elasticsearch syntax - * * @param filter A search filter for the retrieval of the data */ export function buildDistanceFilter( diff --git a/backend/backend/src/storage/elasticsearch/query/filters/geo.ts b/backend/backend/src/storage/elasticsearch/query/filters/geo.ts index d2e96aca..c9f8cb07 100644 --- a/backend/backend/src/storage/elasticsearch/query/filters/geo.ts +++ b/backend/backend/src/storage/elasticsearch/query/filters/geo.ts @@ -17,7 +17,6 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js'; /** * Converts a geo filter to elasticsearch syntax - * * @param filter A search filter for the retrieval of the data */ export function buildGeoFilter(filter: SCGeoFilter): QueryDslSpecificQueryContainer<'geo_shape'> { diff --git a/backend/backend/src/storage/elasticsearch/query/filters/numeric-range.ts b/backend/backend/src/storage/elasticsearch/query/filters/numeric-range.ts index b6c01c4b..1032c9b3 100644 --- a/backend/backend/src/storage/elasticsearch/query/filters/numeric-range.ts +++ b/backend/backend/src/storage/elasticsearch/query/filters/numeric-range.ts @@ -18,7 +18,6 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js'; /** * Converts a numeric range filter to elasticsearch syntax - * * @param filter A search filter for the retrieval of the data */ export function buildNumericRangeFilter( diff --git a/backend/backend/src/storage/elasticsearch/query/filters/value.ts b/backend/backend/src/storage/elasticsearch/query/filters/value.ts index 2da2b124..c531254f 100644 --- a/backend/backend/src/storage/elasticsearch/query/filters/value.ts +++ b/backend/backend/src/storage/elasticsearch/query/filters/value.ts @@ -17,7 +17,6 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js'; /** * Converts a value filter to elasticsearch syntax - * * @param filter A search filter for the retrieval of the data */ export function buildValueFilter( diff --git a/backend/backend/src/storage/elasticsearch/query/query.ts b/backend/backend/src/storage/elasticsearch/query/query.ts index 9f8a1707..3832cab5 100644 --- a/backend/backend/src/storage/elasticsearch/query/query.ts +++ b/backend/backend/src/storage/elasticsearch/query/query.ts @@ -20,7 +20,6 @@ import {buildScoringFunctions} from './boost/scoring-functions.js'; /** * Builds body for Elasticsearch requests - * * @param parameters Parameters for querying the backend * @param defaultConfig Default configuration of the backend * @param elasticsearchConfig Elasticsearch configuration @@ -33,7 +32,7 @@ export const buildQuery = function buildQuery( ): QueryDslQueryContainer { // if config provides a minMatch parameter, we use query_string instead of a match query let query; - if (typeof elasticsearchConfig.query === 'undefined') { + if (elasticsearchConfig.query === undefined) { query = { query_string: { analyzer: 'search_german', @@ -101,11 +100,11 @@ export const buildQuery = function buildQuery( const mustMatch = functionScoreQuery.function_score?.query?.bool?.must; if (Array.isArray(mustMatch)) { - if (typeof query !== 'undefined') { + if (query !== undefined) { mustMatch.push(query); } - if (typeof parameters.filter !== 'undefined') { + if (parameters.filter !== undefined) { mustMatch.push(buildFilter(parameters.filter)); } } diff --git a/backend/backend/src/storage/elasticsearch/query/sort.ts b/backend/backend/src/storage/elasticsearch/query/sort.ts index 3b5b5605..c835a5bc 100644 --- a/backend/backend/src/storage/elasticsearch/query/sort.ts +++ b/backend/backend/src/storage/elasticsearch/query/sort.ts @@ -21,7 +21,6 @@ import {buildPriceSort} from './sort/price.js'; /** * converts query to - * * @param sorts Sorting rules to apply to the data that is being queried * @returns an array of sort queries */ diff --git a/backend/backend/src/storage/elasticsearch/query/sort/distance.ts b/backend/backend/src/storage/elasticsearch/query/sort/distance.ts index 9e9c41f7..618625b4 100644 --- a/backend/backend/src/storage/elasticsearch/query/sort/distance.ts +++ b/backend/backend/src/storage/elasticsearch/query/sort/distance.ts @@ -17,7 +17,6 @@ import {SCDistanceSort} from '@openstapps/core'; /** * Converts a distance sort to elasticsearch syntax - * * @param sort A sorting definition */ export function buildDistanceSort(sort: SCDistanceSort): SortOptions { diff --git a/backend/backend/src/storage/elasticsearch/query/sort/ducet.ts b/backend/backend/src/storage/elasticsearch/query/sort/ducet.ts index 2adb73bc..e4829856 100644 --- a/backend/backend/src/storage/elasticsearch/query/sort/ducet.ts +++ b/backend/backend/src/storage/elasticsearch/query/sort/ducet.ts @@ -17,7 +17,6 @@ import {SCDucetSort} from '@openstapps/core'; /** * Converts a ducet sort to elasticsearch syntax - * * @param sort A sorting definition */ export function buildDucetSort(sort: SCDucetSort): SortOptions { diff --git a/backend/backend/src/storage/elasticsearch/query/sort/generic.ts b/backend/backend/src/storage/elasticsearch/query/sort/generic.ts index d876ed92..32050ae6 100644 --- a/backend/backend/src/storage/elasticsearch/query/sort/generic.ts +++ b/backend/backend/src/storage/elasticsearch/query/sort/generic.ts @@ -17,7 +17,6 @@ import {SCGenericSort} from '@openstapps/core'; /** * Converts a generic sort to elasticsearch syntax - * * @param sort A sorting definition */ export function buildGenericSort(sort: SCGenericSort): SortOptions { diff --git a/backend/backend/src/storage/elasticsearch/query/sort/price.ts b/backend/backend/src/storage/elasticsearch/query/sort/price.ts index 75f9436a..10ce2971 100644 --- a/backend/backend/src/storage/elasticsearch/query/sort/price.ts +++ b/backend/backend/src/storage/elasticsearch/query/sort/price.ts @@ -17,7 +17,6 @@ import {SCPriceSort, SCSportCoursePriceGroup, SCThingsField} from '@openstapps/c /** * Converts a price sort to elasticsearch syntax - * * @param sort A sorting definition */ export function buildPriceSort(sort: SCPriceSort): SortOptions { @@ -32,7 +31,6 @@ export function buildPriceSort(sort: SCPriceSort): SortOptions { /** * Provides a script for sorting search results by prices - * * @param universityRole User group which consumes university services * @param field Field in which wanted offers with prices are located */ diff --git a/backend/backend/src/storage/elasticsearch/templating.ts b/backend/backend/src/storage/elasticsearch/templating.ts index 79ec021f..7a112582 100644 --- a/backend/backend/src/storage/elasticsearch/templating.ts +++ b/backend/backend/src/storage/elasticsearch/templating.ts @@ -33,12 +33,11 @@ export const aggregations = JSON.parse( * Prepares all indices * * This includes applying the mapping, settings - * * @param client An elasticsearch client to use * @param type the SCThingType of which the template should be set */ export async function putTemplate(client: Client, type: SCThingType) { - const sanitizedType = `template_${type.replace(/\s/g, '_')}`; + const sanitizedType = `template_${type.replaceAll(/\s/g, '_')}`; return client.indices.putTemplate({ body: mappings[sanitizedType], diff --git a/backend/backend/src/storage/elasticsearch/types/elasticsearch-config.ts b/backend/backend/src/storage/elasticsearch/types/elasticsearch-config.ts index 91231cc4..52476d94 100644 --- a/backend/backend/src/storage/elasticsearch/types/elasticsearch-config.ts +++ b/backend/backend/src/storage/elasticsearch/types/elasticsearch-config.ts @@ -27,35 +27,30 @@ export interface ElasticsearchQueryDisMaxConfig { /** * The maximum allowed Levenshtein Edit Distance (or number of edits) - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/common-options.html#fuzziness */ fuzziness: number | string; /** * Increase the importance (relevance score) of a field - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/mapping-boost.html */ matchBoosting: number; /** * Minimal number (or percentage) of words that should match in a query - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-minimum-should-match.html */ minMatch: string; /** * Type of the query - in this case 'dis_max' which is a union of its subqueries - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-dis-max-query.html */ queryType: 'dis_max'; /** * Changes behavior of default calculation of the score when multiple results match - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-multi-match-query.html#tie-breaker */ tieBreaker: number; @@ -70,14 +65,12 @@ export interface ElasticsearchQueryDisMaxConfig { export interface ElasticsearchQueryQueryStringConfig { /** * Minimal number (or percentage) of words that should match in a query - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-minimum-should-match.html */ minMatch: string; /** * Type of the query - in this case 'query_string' which uses a query parser in order to parse content - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-query-string-query.html */ queryType: 'query_string'; diff --git a/backend/backend/src/storage/elasticsearch/util/alias.ts b/backend/backend/src/storage/elasticsearch/util/alias.ts index 7cef01f8..2287958c 100644 --- a/backend/backend/src/storage/elasticsearch/util/alias.ts +++ b/backend/backend/src/storage/elasticsearch/util/alias.ts @@ -16,7 +16,6 @@ import {Logger} from '@openstapps/logger'; /** * Checks for invalid character in alias names and removes them - * * @param alias The alias name * @param uid The UID of the current bulk (for debugging purposes) */ diff --git a/backend/backend/src/storage/elasticsearch/util/index.ts b/backend/backend/src/storage/elasticsearch/util/index.ts index 4b037891..48f87067 100644 --- a/backend/backend/src/storage/elasticsearch/util/index.ts +++ b/backend/backend/src/storage/elasticsearch/util/index.ts @@ -44,25 +44,23 @@ export function parseIndexName(index: string): ParsedIndexName { /** * Gets the index name in elasticsearch for one SCThingType - * * @param type SCThingType of data in the index * @param source source of data in the index * @param bulk bulk process which created this index */ export function getThingIndexName(type: SCThingType, source: string, bulk: SCBulkResponse) { - return `stapps_${type.replace(/\s+/g, '_')}_${source}_${getIndexUID(bulk.uid)}`; + return `stapps_${type.replaceAll(/\s+/g, '_')}_${source}_${getIndexUID(bulk.uid)}`; } /** * Returns an index that matches all indices with the specified type */ export function matchIndexByType(type: SCThingType, source: string) { - return `stapps_${type.replace(/\s+/g, '_')}_${source}_*`; + return `stapps_${type.replaceAll(/\s+/g, '_')}_${source}_*`; } /** * Provides the index UID (for its name) from the bulk UID - * * @param uid Bulk UID */ export function getIndexUID(uid: SCUuid) { diff --git a/backend/backend/src/storage/elasticsearch/util/no-undefined.ts b/backend/backend/src/storage/elasticsearch/util/no-undefined.ts index 118bab84..3d05c0d6 100644 --- a/backend/backend/src/storage/elasticsearch/util/no-undefined.ts +++ b/backend/backend/src/storage/elasticsearch/util/no-undefined.ts @@ -17,5 +17,5 @@ * Type guard for filter functions */ export function noUndefined(item: T | undefined): item is T { - return typeof item !== 'undefined'; + return item !== undefined; } diff --git a/backend/proxy/package.json b/backend/proxy/package.json index e4bdd11d..e528c2f0 100644 --- a/backend/proxy/package.json +++ b/backend/proxy/package.json @@ -34,7 +34,7 @@ "is-cidr": "4.0.2", "mustache": "4.2.0", "semver": "7.3.8", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "devDependencies": { "@openstapps/eslint-config": "workspace:*", diff --git a/backend/proxy/src/main.ts b/backend/proxy/src/main.ts index 73972b72..971c6463 100644 --- a/backend/proxy/src/main.ts +++ b/backend/proxy/src/main.ts @@ -35,7 +35,6 @@ import PortScanner from './port-scanner.js'; /** * Checks if a ContainerInfo matches a name and version regex - * * @param name Name to check * @param versionRegex Version regex to check * @param container Container info for check @@ -61,7 +60,6 @@ export function containerMatchesRegex( * * Returns an empty String if there is no Gateway. * This assumes that a backend runs in the container and it exposes one port. - * * @param container Container info of which to get address from */ export async function getGatewayOfStAppsBackend(container: Dockerode.ContainerInfo): Promise { @@ -73,7 +71,7 @@ Please expose a port if the container should be accessible by NGINX.`); } // Basic Docker network - if (typeof container.Ports[0].IP !== 'undefined' && typeof container.Ports[0].PublicPort !== 'undefined') { + if (container.Ports[0].IP !== undefined && container.Ports[0].PublicPort !== undefined) { // ip:port return `${container.Ports[0].IP}:${container.Ports[0].PublicPort}`; } @@ -81,8 +79,8 @@ Please expose a port if the container should be accessible by NGINX.`); // Docker Swarm network if ( /* istanbul ignore next */ - typeof container.NetworkSettings?.Networks?.ingress?.IPAddress !== 'undefined' && - typeof container.Ports[0].PrivatePort !== 'undefined' + container.NetworkSettings?.Networks?.ingress?.IPAddress !== undefined && + container.Ports[0].PrivatePort !== undefined ) { const port = container.Ports[0].PrivatePort; @@ -108,7 +106,6 @@ Please expose a port if the container should be accessible by NGINX.`); * Generates an upstream map * * It maps all stapps-backend-containers to an gateway. - * * @param activeVersions List of active versions * @param outdatedVersions List of outdated versions * @param containers List of container infos @@ -131,7 +128,7 @@ export async function generateUpstreamMap( result += ( await Promise.all( activeVersions.map(async activeVersionRegex => { - const upstreamName = activeVersionRegex.replace(/[\\|.+]/g, '_'); + const upstreamName = activeVersionRegex.replaceAll(/[\\|.+]/g, '_'); let activeBackends = containers.filter(container => { return containerMatchesRegex('backend', new RegExp(activeVersionRegex), container); @@ -205,14 +202,14 @@ export function generateListener(sslFilePaths: SSLFilePaths) { let listener = ''; if ( - typeof sslFilePaths !== 'undefined' && - typeof sslFilePaths.certificate !== 'undefined' && + sslFilePaths !== undefined && + sslFilePaths.certificate !== undefined && isFileType(sslFilePaths.certificate, 'crt') && - typeof sslFilePaths.certificateChain !== 'undefined' && + sslFilePaths.certificateChain !== undefined && isFileType(sslFilePaths.certificateChain, 'crt') && - typeof sslFilePaths.certificateKey !== 'undefined' && + sslFilePaths.certificateKey !== undefined && isFileType(sslFilePaths.certificateKey, 'key') && - typeof sslFilePaths.dhparam !== 'undefined' && + sslFilePaths.dhparam !== undefined && isFileType(sslFilePaths.dhparam, 'pem') ) { // https listener @@ -251,7 +248,6 @@ export async function generateMetricsServer(logFormat: string, enableMetrics?: b /** * Render a mustache template file with given view object - * * @param path Path to template file * @param view Data to render template with */ @@ -263,7 +259,6 @@ async function renderTemplate(path: string, view: unknown): Promise { /** * Generate allow list entries in CIDR notation that pass thru rate limiting - * * @param entries Allow list entries that should be in CIDR notation */ function generateRateLimitAllowList(entries: string[]): string { @@ -275,7 +270,6 @@ function generateRateLimitAllowList(entries: string[]): string { /** * Returns view for nginx config file - * * @param containers List of container info */ export async function getTemplateView(containers: Dockerode.ContainerInfo[]): Promise { @@ -321,7 +315,6 @@ export async function getTemplateView(containers: Dockerode.ContainerInfo[]): Pr /** * Read the list of docker containers - * * @param pathToDockerSocket Path to docker socket */ export async function getContainers( diff --git a/configuration/eslint-config/index.js b/configuration/eslint-config/index.js index b06dd09c..f19d8236 100644 --- a/configuration/eslint-config/index.js +++ b/configuration/eslint-config/index.js @@ -22,7 +22,7 @@ const config = { 'plugin:@typescript-eslint/recommended', 'plugin:jsdoc/recommended', 'plugin:unicorn/recommended', - 'prettier' + 'prettier', ], plugins: ['eslint-plugin-unicorn', 'eslint-plugin-jsdoc'], settings: { @@ -50,9 +50,7 @@ const config = { ], 'unicorn/no-nested-ternary': 'off', 'unicorn/better-regex': 'off', - 'unicorn/no-typeof-undefined': 'off', 'unicorn/no-non-null-assertion': 'off', - 'unicorn/prefer-array-some': 'off', 'jsdoc/no-types': 'error', 'jsdoc/require-param': 'off', @@ -97,4 +95,4 @@ const config = { ], }; -module.exports = config +module.exports = config; diff --git a/configuration/eslint-config/package.json b/configuration/eslint-config/package.json index 1d18cd13..b8830443 100644 --- a/configuration/eslint-config/package.json +++ b/configuration/eslint-config/package.json @@ -13,16 +13,16 @@ "devDependencies": { "@openstapps/tsconfig": "workspace:*", "@types/node": "18.15.3", - "eslint": "8.33.0", - "typescript": "4.8.4" + "eslint": "8.41.0", + "typescript": "4.9.5" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "5.49.0", - "@typescript-eslint/parser": "5.49.0", - "eslint": "8.33.0", - "eslint-config-prettier": "8.6.0", - "eslint-plugin-jsdoc": "39.7.4", + "@typescript-eslint/eslint-plugin": "5.59.8", + "@typescript-eslint/parser": "5.59.8", + "eslint": "8.41.0", + "eslint-config-prettier": "8.8.0", + "eslint-plugin-jsdoc": "46.1.0", "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-unicorn": "45.0.2" + "eslint-plugin-unicorn": "47.0.0" } } diff --git a/configuration/projectmanagement/package.json b/configuration/projectmanagement/package.json index d9c71c2d..a8ea55d6 100644 --- a/configuration/projectmanagement/package.json +++ b/configuration/projectmanagement/package.json @@ -31,7 +31,7 @@ "@openstapps/logger": "workspace:*", "@slack/web-api": "6.8.1", "commander": "10.0.0", - "date-fns": "2.29.3", + "date-fns": "2.30.0", "glob": "10.2.6", "mustache": "4.2.0" }, @@ -52,7 +52,7 @@ "mocha": "10.2.0", "ts-node": "10.9.1", "tsup": "6.7.0", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "tsup": { "entry": [ diff --git a/configuration/projectmanagement/src/common.ts b/configuration/projectmanagement/src/common.ts index 2ae6c61d..d455d86b 100644 --- a/configuration/projectmanagement/src/common.ts +++ b/configuration/projectmanagement/src/common.ts @@ -17,7 +17,6 @@ import {Logger} from '@openstapps/logger'; /** * Get projects for a list of groups - * * @param api GitLab API to make requests with * @param groups List of groups */ diff --git a/configuration/projectmanagement/src/tasks/get-used-version.ts b/configuration/projectmanagement/src/tasks/get-used-version.ts index ff11e56f..cb21f60d 100644 --- a/configuration/projectmanagement/src/tasks/get-used-version.ts +++ b/configuration/projectmanagement/src/tasks/get-used-version.ts @@ -18,7 +18,6 @@ import {readFile} from 'fs/promises'; /** * Get used version of a dependency of a project referenced by a path - * * @param directoryPath Path to a Node.js project directory * @param dependency Dependency to get used version of */ @@ -46,7 +45,6 @@ export async function getUsedVersion(directoryPath: PathLike, dependency: string * Get 'MAJOR.MINOR' part of a used version * * See [[getUsedVersion]]. - * * @param path see [[getUsedVersion]] * @param dependency see [[getUsedVersion]] */ diff --git a/configuration/projectmanagement/src/tasks/remind.ts b/configuration/projectmanagement/src/tasks/remind.ts index 3714ac2c..74153112 100644 --- a/configuration/projectmanagement/src/tasks/remind.ts +++ b/configuration/projectmanagement/src/tasks/remind.ts @@ -27,7 +27,6 @@ import {GROUPS, MAX_DEPTH_FOR_REMINDER, NOTE_PREFIX, SLACK_CHANNEL} from '../con /** * Remind people of open merge requests - * * @param api GitLab API to make requests with */ export async function remind(api: Api): Promise { @@ -54,9 +53,7 @@ export async function remind(api: Api): Promise { // instantiate slack client const client = - typeof process.env.SLACK_API_TOKEN === 'undefined' - ? undefined - : new WebClient(process.env.SLACK_API_TOKEN); + process.env.SLACK_API_TOKEN === undefined ? undefined : new WebClient(process.env.SLACK_API_TOKEN); // get members of main group const members = await api.getMembers(MembershipScope.GROUPS, GROUPS[0]); @@ -92,14 +89,14 @@ export async function remind(api: Api): Promise { // check if at least one of the discussions is unresolved const hasUnresolvedDiscussions = discussions.some(discussion => { return discussion.notes.some(note => { - return note.resolvable && (typeof note.resolved === 'undefined' || !note.resolved); + return note.resolvable && (note.resolved === undefined || !note.resolved); }); }); if (hasUnresolvedDiscussions) { let recipient = mergeRequest.author.username; - if (typeof mergeRequest.assignee !== 'undefined' && mergeRequest.assignee !== null) { + if (mergeRequest.assignee !== undefined && mergeRequest.assignee !== null) { recipient = mergeRequest.assignee.username; } diff --git a/configuration/projectmanagement/src/tasks/report.ts b/configuration/projectmanagement/src/tasks/report.ts index 43998a7a..a5721239 100644 --- a/configuration/projectmanagement/src/tasks/report.ts +++ b/configuration/projectmanagement/src/tasks/report.ts @@ -146,7 +146,6 @@ export interface MergeRequestsForProjects { /** * Check if issue state is opened or closed - * * @param state State to check */ export function issueStateIsOpenedOrClosed( @@ -157,7 +156,6 @@ export function issueStateIsOpenedOrClosed( /** * Get merge request URLs from given data - * * @param projectMergeRequests Merge requests data (object containing array of objects) * @param projectId Project ID to get data about merge requests for * @param issueIid Issue IID in certain project (relative ID, and not issue's GitLab API ID) @@ -167,10 +165,7 @@ export function getMergeRequestUrls( projectId: number, issueIid: number, ): string[] { - if ( - typeof projectMergeRequests[projectId] === 'undefined' || - projectMergeRequests[projectId].length === 0 - ) { + if (projectMergeRequests[projectId] === undefined || projectMergeRequests[projectId].length === 0) { return []; } @@ -185,7 +180,6 @@ export function getMergeRequestUrls( /** * Get issues from all groups with a specific milestone - * * @param api GitLab API to make requests with * @param label Label to filter by * @param groups List of groups to get issues for @@ -210,7 +204,6 @@ export async function getIssues(api: Api, label: string, groups: number[]): Prom /** * Get IDs of issues with branches for projects - * * @param api GitLab API To make requests with * @param projects List of projects */ @@ -240,7 +233,6 @@ export async function getIssueBranches(api: Api, projects: Project[]): Promise<{ /** * Get issues grouped by assignees - * * @param api GitLab API to make requests with * @param label Label to generate report for */ @@ -269,7 +261,7 @@ export async function getIssuesGroupedByAssignees(api: Api, label: string): Prom continue; } - if (typeof issuesByAssignee[issue.assignee.id] === 'undefined') { + if (issuesByAssignee[issue.assignee.id] === undefined) { issuesByAssignee[issue.assignee.id] = { assignee: issue.assignee, issueCounts: { @@ -287,8 +279,7 @@ export async function getIssuesGroupedByAssignees(api: Api, label: string): Prom const issueMeta = { $branchExists: - typeof issueBranches[issue.project_id] !== 'undefined' && - issueBranches[issue.project_id].includes(issue.iid), + issueBranches[issue.project_id] !== undefined && issueBranches[issue.project_id].includes(issue.iid), $closed: issue.state === IssueState.CLOSED, $issue: issue, $labels: issue.labels.map((issueLabel: string) => { @@ -387,7 +378,6 @@ export function getNextMeetingDay() { /** * Get a list of merge requests for projects - * * @param api GitLab API to make requests with * @param projects List of projects */ @@ -432,7 +422,6 @@ export async function getMergeRequests(api: Api, projects: Project[]): Promise { @@ -58,7 +57,7 @@ export async function tidyIssuesWithoutMilestone(api: Api): Promise { await Promise.all( issuesWithoutMilestone.map(async issue => { - if (typeof milestoneCache[issue.project_id] === 'undefined') { + if (milestoneCache[issue.project_id] === undefined) { milestoneCache[issue.project_id] = await api.getMilestonesForProject(issue.project_id); } @@ -70,7 +69,7 @@ export async function tidyIssuesWithoutMilestone(api: Api): Promise { } } - if (typeof milestoneId === 'undefined') { + if (milestoneId === undefined) { Logger.warn(`Milestone 'Meeting' was not available for issue ${issue.title} (${issue.web_url}).`); return; @@ -96,7 +95,6 @@ export async function tidyIssuesWithoutMilestone(api: Api): Promise { * Tidy open issues without meeting label * * This adds the label 'meeting' to all open issues that do not have this label. - * * @param api GitLab API instante to use for requests */ export async function tidyOpenIssuesWithoutMeetingLabel(api: Api): Promise { @@ -141,7 +139,6 @@ export async function tidyOpenIssuesWithoutMeetingLabel(api: Api): Promise /** * Tidy labels in a list of projects - * * @param api GitLab API instance to use for the requests * @param projects List of projects to tidy labels on */ @@ -189,7 +186,6 @@ export async function tidyLabels(api: Api, projects: Project[]): Promise { /** * Tidy milestones in a list of projects - * * @param api GitLab API instance to use for the requests * @param projects List of projects to tidy milestones on */ @@ -223,7 +219,6 @@ export async function tidyMilestones(api: Api, projects: Project[]): Promise { @@ -357,7 +350,6 @@ export async function tidySubGroupMembers(api: Api): Promise { * Tidy issues without assignee * * Set assignee to author if no assignee is set. - * * @param api GitLab API instance to use for the requests */ export async function tidyIssuesWithoutAssignee(api: Api): Promise { @@ -399,7 +391,6 @@ export async function tidyIssuesWithoutAssignee(api: Api): Promise { * Tidy merge requests without assignee * * Set assignee to author if no assignee is set. - * * @param api GitLab API instance to use for the requests */ export async function tidyMergeRequestsWithoutAssignee(api: Api): Promise { @@ -435,7 +426,6 @@ export async function tidyMergeRequestsWithoutAssignee(api: Api): Promise /** * Tidy - * * @param api GitLab API instance to use for the requests */ export async function tidy(api: Api) { diff --git a/configuration/projectmanagement/src/tasks/unlabel.ts b/configuration/projectmanagement/src/tasks/unlabel.ts index 4f62d0ff..7ad252d9 100644 --- a/configuration/projectmanagement/src/tasks/unlabel.ts +++ b/configuration/projectmanagement/src/tasks/unlabel.ts @@ -19,7 +19,6 @@ import isBefore from 'date-fns/isBefore'; /** * Remove label `meeting` from closed issues - * * @param api Instance of GitLabAPI to send requests with */ export async function unlabel(api: Api) { diff --git a/examples/minimal-connector/package.json b/examples/minimal-connector/package.json index ac956c17..3d42f799 100644 --- a/examples/minimal-connector/package.json +++ b/examples/minimal-connector/package.json @@ -20,7 +20,7 @@ "format:fix": "prettier --write . --ignore-path ../../.gitignore", "lint": "eslint --ext .ts src/", "lint:fix": "eslint --fix --ext .ts src/", - "test": "c8 mocha" + "test": "c8 mocha --exit" }, "dependencies": { "@openstapps/api": "workspace:*", @@ -45,7 +45,7 @@ "nock": "13.3.1", "ts-node": "10.9.1", "tsup": "6.7.0", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "tsup": { "entry": [ diff --git a/examples/minimal-connector/src/common.ts b/examples/minimal-connector/src/common.ts index 5e5010db..00c9c8fd 100644 --- a/examples/minimal-connector/src/common.ts +++ b/examples/minimal-connector/src/common.ts @@ -18,7 +18,6 @@ import {Connector} from './connector.js'; /** * Checks if the input is a valid SCNamespace - * * @param input Name of the potential SCNamespace */ export function isValidSCNamespace(input: string): input is SCLicensePlate { @@ -29,7 +28,6 @@ export function isValidSCNamespace(input: string): input is SCLicensePlate { * Creates a uuid from a JSON stringified item identifier * * You may create custom itemIdentifier-Interfaces to generate UIDs consistently - * * @param itemIdentifier Identifying representation of the item * @param licensePlate License plate of the school */ @@ -40,7 +38,6 @@ export function createUUID(itemIdentifier: unknown, licensePlate: SCLicensePlate /** * Fetches items specified by the connector and pushs them to the backend, * by overwriting the bulk indexed with the `origin`. - * * @param backend URL of the StApps backend eployment * @param connector Connector to be executed */ diff --git a/examples/minimal-connector/src/connector.ts b/examples/minimal-connector/src/connector.ts index 8e7d399a..5397f8b8 100644 --- a/examples/minimal-connector/src/connector.ts +++ b/examples/minimal-connector/src/connector.ts @@ -20,7 +20,6 @@ import {createUUID} from './common.js'; * * By extending this class connector-developers only need to implement the load and transform of the data * Pushing the data to the backend will be handled automatically - * * @template T Any serializable type */ export abstract class Connector { @@ -36,7 +35,6 @@ export abstract class Connector { /** * Abstract constructor for a connector - * * @param licensePlate License plate of the school * @param origin Name of the connector */ diff --git a/examples/minimal-connector/src/minimal-connector.ts b/examples/minimal-connector/src/minimal-connector.ts index eaa52f6d..af42a3cb 100644 --- a/examples/minimal-connector/src/minimal-connector.ts +++ b/examples/minimal-connector/src/minimal-connector.ts @@ -27,7 +27,6 @@ export class MinimalConnector extends Connector { /** * Constructor for the MinimalConnector - * * @param licensePlate License plate of the school * @param origin Name of the connector */ diff --git a/examples/minimal-plugin/package.json b/examples/minimal-plugin/package.json index fa0eec34..c1393200 100644 --- a/examples/minimal-plugin/package.json +++ b/examples/minimal-plugin/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "@openstapps/api": "workspace:*", + "@openstapps/api-plugin": "workspace:*", "@openstapps/core": "workspace:*", "@openstapps/core-tools": "workspace:*", "@openstapps/logger": "workspace:*", @@ -34,7 +35,7 @@ "@types/express": "4.17.17", "@types/node": "18.15.3", "tsup": "6.7.0", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "tsup": { "entry": [ diff --git a/examples/minimal-plugin/src/app.ts b/examples/minimal-plugin/src/app.ts index 808442ab..be52ff57 100644 --- a/examples/minimal-plugin/src/app.ts +++ b/examples/minimal-plugin/src/app.ts @@ -13,7 +13,8 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -import {HttpClient, PluginClient} from '@openstapps/api'; +import {HttpClient} from '@openstapps/api'; +import {PluginClient} from '@openstapps/api-plugin'; import {Converter} from '@openstapps/core-tools'; import {Logger} from '@openstapps/logger'; import {Command, Option} from 'commander'; diff --git a/examples/minimal-plugin/src/plugin/minimal-plugin.ts b/examples/minimal-plugin/src/plugin/minimal-plugin.ts index a25dd1d9..a0137b76 100644 --- a/examples/minimal-plugin/src/plugin/minimal-plugin.ts +++ b/examples/minimal-plugin/src/plugin/minimal-plugin.ts @@ -12,7 +12,7 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -import {Plugin} from '@openstapps/api'; +import {Plugin} from '@openstapps/api-plugin'; import * as express from 'express'; import {SCMinimalRequest} from './protocol/request.js'; import {SCMinimalResponse} from './protocol/response.js'; @@ -28,7 +28,6 @@ export class MinimalPlugin extends Plugin { * Calculates the sum of a list of numbers * * TODO: remove this function and write your own ones - * * @param numbers the list of numbers */ private static sum(numbers: number[]): number { @@ -40,7 +39,6 @@ export class MinimalPlugin extends Plugin { * * For this example the whole purpose of the plugin is to receive a list of numbers and return the sum of them. * TODO: remove the body of the function and replace with your own logic - * * @param request the express request object * @param response the express response object */ diff --git a/examples/minimal-plugin/src/plugin/protocol/request.ts b/examples/minimal-plugin/src/plugin/protocol/request.ts index 443ea213..da6fe388 100644 --- a/examples/minimal-plugin/src/plugin/protocol/request.ts +++ b/examples/minimal-plugin/src/plugin/protocol/request.ts @@ -19,7 +19,6 @@ * All incoming requests will look like this, this is being checked by the backend. You need to add the @validatable tag * like shown below for the plugin to work. The request can have any layout you like. * TODO: remove body of the interface and replace with your own layout - * * @validatable */ export interface SCMinimalRequest { diff --git a/examples/minimal-plugin/src/plugin/protocol/response.ts b/examples/minimal-plugin/src/plugin/protocol/response.ts index c0c5d191..8f43cf3d 100644 --- a/examples/minimal-plugin/src/plugin/protocol/response.ts +++ b/examples/minimal-plugin/src/plugin/protocol/response.ts @@ -19,7 +19,6 @@ * All your responses to the backend are required to look like this. You need to add the @validatable tag like shown * below for the plugin to work. The response can have any layout you like. * TODO: remove body of the interface and replace with your own layout - * * @validatable */ export interface SCMinimalResponse { diff --git a/frontend/app/.eslintrc.json b/frontend/app/.eslintrc.json index 828ef112..41805564 100644 --- a/frontend/app/.eslintrc.json +++ b/frontend/app/.eslintrc.json @@ -44,6 +44,7 @@ ], "unicorn/no-nested-ternary": "off", "unicorn/better-regex": "off", + "unicorn/no-non-null-assertion": "off", "jsdoc/no-types": "error", "jsdoc/require-param": "off", "jsdoc/require-param-description": "error", diff --git a/frontend/app/package.json b/frontend/app/package.json index 1e0bee34..746a2959 100644 --- a/frontend/app/package.json +++ b/frontend/app/package.json @@ -2,7 +2,6 @@ "name": "@openstapps/app", "description": "The generic app tailored to fulfill needs of German universities, written using Ionic Framework.", "version": "2.1.0", - "type": "module", "license": "GPL-3.0-only", "author": "Karl-Philipp Wulfert ", "contributors": [ @@ -163,7 +162,7 @@ "protractor": "7.0.0", "surge": "0.23.1", "ts-node": "10.9.1", - "typescript": "4.8.4", + "typescript": "4.6.4", "webpack-bundle-analyzer": "4.7.0" }, "prettier": "@openstapps/prettier-config", diff --git a/frontend/app/src/app/modules/catalog/catalog.component.ts b/frontend/app/src/app/modules/catalog/catalog.component.ts index 58ebbdc4..beefbf4c 100644 --- a/frontend/app/src/app/modules/catalog/catalog.component.ts +++ b/frontend/app/src/app/modules/catalog/catalog.component.ts @@ -120,7 +120,7 @@ export class CatalogComponent implements OnInit, OnDestroy { this.availableSemesters = semesters .slice(Math.max(0, currentSemesterIndex - 1), Math.min(currentSemesterIndex + 2, semesters.length)) .reverse(); - if (typeof this.activeSemester !== 'undefined') { + if (this.activeSemester !== undefined) { return; } diff --git a/frontend/app/src/app/modules/data/data.provider.spec.ts b/frontend/app/src/app/modules/data/data.provider.spec.ts index d7cfadfb..83aab7dd 100644 --- a/frontend/app/src/app/modules/data/data.provider.spec.ts +++ b/frontend/app/src/app/modules/data/data.provider.spec.ts @@ -14,7 +14,7 @@ */ /* eslint-disable @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-explicit-any, unicorn/no-thenable */ import {TestBed} from '@angular/core/testing'; -import {Client} from '@openstapps/api/lib/client'; +import {Client} from '@openstapps/api'; import { SCDish, SCMessage, diff --git a/frontend/app/src/app/modules/hebis/daia-data.provider.ts b/frontend/app/src/app/modules/hebis/daia-data.provider.ts index 6ec60129..58c780d8 100644 --- a/frontend/app/src/app/modules/hebis/daia-data.provider.ts +++ b/frontend/app/src/app/modules/hebis/daia-data.provider.ts @@ -132,9 +132,7 @@ export class DaiaDataProvider { signature: label, status: holdingStatus, dueDate: dueDate, - online: - Array.isArray(available) && - available.find(item => item.service === 'remote') !== undefined, + online: Array.isArray(available) && available.some(item => item.service === 'remote'), available: (Array.isArray(available) && available.find(item => diff --git a/package.json b/package.json index 39bb8d10..40d0075b 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,13 @@ "name": "@openstapps/openstapps", "version": "2.1.0", "scripts": { - "build": "dotenv -c -- turbo run build --filter=!@openstapps/app", + "build": "dotenv -c -- turbo run build", "dev": "dotenv -c -- turbo run dev", "docs": "dotenv -c -- turbo run docs && typedoc", "format": "dotenv -c -- turbo run format", "format:fix": "dotenv -c -- turbo run format:fix", - "lint": "dotenv -c -- turbo run lint --filter=!@openstapps/app", - "lint:fix": "dotenv -c -- turbo run lint:fix --filter=!@openstapps/app", + "lint": "dotenv -c -- turbo run lint", + "lint:fix": "dotenv -c -- turbo run lint:fix", "publish-packages": "dotenv -c -- turbo run build format lint test && changeset version && changeset publish", "syncpack": "syncpack list-mismatches && syncpack lint-semver-ranges", "syncpack:fix": "syncpack format && syncpack fix-mismatches", @@ -25,6 +25,6 @@ "syncpack": "10.1.0", "turbo": "1.10.0", "typedoc": "0.24.7", - "typescript": "4.8.4" + "typescript": "4.9.5" } } diff --git a/packages/api/Dockerfile b/packages/api-cli/Dockerfile similarity index 100% rename from packages/api/Dockerfile rename to packages/api-cli/Dockerfile diff --git a/packages/api-cli/LICENSE b/packages/api-cli/LICENSE new file mode 100644 index 00000000..9df63ccc --- /dev/null +++ b/packages/api-cli/LICENSE @@ -0,0 +1,200 @@ +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS + +0. Definitions. +"This License" refers to version 3 of the GNU General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based on the Program. + +To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. +A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: +a) The work must carry prominent notices stating that you modified it, and giving a relevant date. +b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". +c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. +d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: +a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. +b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. +c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. +d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. +e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + +a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or +b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or +c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or +d) Limiting the use for publicity purposes of names of licensors or authors of the material; or +e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or +f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. +All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. +10. Automatic Licensing of Downstream Recipients. +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. +An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. +A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". +A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. +13. Use with the GNU Affero General Public License. +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. +14. Revised Versions of this License. +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +16. Limitation of Liability. +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +17. Interpretation of Sections 15 and 16. +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + +Copyright (C) + +This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + Copyright (C) +This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. +This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". + +You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/packages/api-cli/README.md b/packages/api-cli/README.md new file mode 100644 index 00000000..02b689f6 --- /dev/null +++ b/packages/api-cli/README.md @@ -0,0 +1,63 @@ +# @openstapps/api-cli + +To get some data into a local `backend-node`-instance, you can run this +as a standalone program to copy data of a remote `backend-node`-instance +into your local one. + +Example to copy all Events of the b-tu instance: + +```shell +npm install +npm run build +node ./lib/cli.js copy Event https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100 +``` + +Example to index all items from @openstapps/core test files to a backend: + +```shell +npm install +npm run build +node ./lib/cli.js e2e http://localhost:3000 +``` + +### Program arguments + +```shell +node ./lib/cli.js copy + +node ./lib/cli.js e2e +``` + +#### Options + +The source identifier for the bulk to use with the target instance (default is 'copy') + +```shell +-s, --bulkSource +``` + +The App version to use (unset by default) + +```shell +-a, --appVersion +``` + +The only available option for `e2e` command. File path to json test files each containing a SCThing. + +```shell +-s, --samples +``` + +### Example execution + +with docker when backend is running on `localhost:3000`: + +```shell +docker run --net=host registry.gitlab.com/openstapps/api/cli copy Place https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100 +``` + +Or using `e2e` command: + +```shell +docker run --net=host registry.gitlab.com/openstapps/api/cli e2e http://localhost:3000 +``` diff --git a/packages/api/app.js b/packages/api-cli/app.js similarity index 100% rename from packages/api/app.js rename to packages/api-cli/app.js diff --git a/packages/api-cli/package.json b/packages/api-cli/package.json new file mode 100644 index 00000000..5516dd1e --- /dev/null +++ b/packages/api-cli/package.json @@ -0,0 +1,80 @@ +{ + "name": "@openstapps/api-cli", + "description": "CLI client for @openstapps/api", + "version": "2.1.0", + "type": "module", + "license": "GPL-3.0-only", + "repository": "git@gitlab.com:openstapps/api.git", + "author": "Karl-Philipp Wulfert ", + "contributors": [ + "André Michael Thomas Bierlein", + "Anselm Stordeur ", + "Jovan Krunić ", + "Michel Jonathan Schmitz", + "Rainer Killinger ", + "Roman Klopsch", + "Thea Schöbl " + ], + "bin": { + "openstapps-api": "app.js" + }, + "scripts": { + "build": "tsup", + "format": "prettier . -c --ignore-path ../../.gitignore", + "format:fix": "prettier --write . --ignore-path ../../.gitignore", + "lint": "tsc --noEmit && eslint --ext .ts src/", + "lint:fix": "eslint --fix --ext .ts src/", + "test": "c8 mocha --exit" + }, + "devDependencies": { + "@openstapps/api": "workspace:*", + "@openstapps/core": "workspace:*", + "@openstapps/core-tools": "workspace:*", + "@openstapps/eslint-config": "workspace:*", + "@openstapps/logger": "workspace:*", + "@openstapps/prettier-config": "workspace:*", + "@openstapps/tsconfig": "workspace:*", + "@types/chai": "4.3.5", + "@types/chai-as-promised": "7.1.5", + "@types/chai-spies": "1.0.3", + "@types/cli-progress": "3.11.0", + "@types/express": "4.17.17", + "@types/fs-extra": "9.0.13", + "@types/json-schema": "7.0.11", + "@types/mocha": "10.0.1", + "@types/node": "18.15.3", + "@types/wait-on": "5.3.1", + "c8": "7.14.0", + "chai": "4.3.7", + "chai-as-promised": "7.1.1", + "chai-spies": "1.0.0", + "cli-progress": "3.12.0", + "commander": "10.0.0", + "fs-extra": "10.1.0", + "mocha": "10.2.0", + "nock": "13.3.1", + "ts-node": "10.9.1", + "tsup": "6.7.0", + "typescript": "4.9.5", + "wait-on": "6.0.1" + }, + "peerDependencies": { + "@openstapps/core": "workspace:*" + }, + "tsup": { + "entry": [ + "src/app.ts", + "src/index.ts" + ], + "sourcemap": true, + "clean": true, + "format": "esm", + "outDir": "lib" + }, + "prettier": "@openstapps/prettier-config", + "eslintConfig": { + "extends": [ + "@openstapps" + ] + } +} diff --git a/packages/api/src/app.ts b/packages/api-cli/src/app.ts similarity index 98% rename from packages/api/src/app.ts rename to packages/api-cli/src/app.ts index 65dee471..96433446 100644 --- a/packages/api/src/app.ts +++ b/packages/api-cli/src/app.ts @@ -19,10 +19,10 @@ import {readFileSync} from 'fs'; import path from 'path'; import {URL} from 'url'; import waitOn from 'wait-on'; +import {HttpClient} from '@openstapps/api'; import {copy} from './copy.js'; // eslint-disable-next-line unicorn/prevent-abbreviations import {e2eRun} from './e2e.js'; -import {HttpClient} from './http-client.js'; process.on('unhandledRejection', async error => { await Logger.error('unhandledRejection', error); diff --git a/packages/api/src/copy.ts b/packages/api-cli/src/copy.ts similarity index 84% rename from packages/api/src/copy.ts rename to packages/api-cli/src/copy.ts index c852110a..231b17cb 100644 --- a/packages/api/src/copy.ts +++ b/packages/api-cli/src/copy.ts @@ -12,13 +12,9 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -import {asyncPool} from '@krlwlfrt/async-pool/lib/async-pool.js'; import {SCSearchRequest, SCThingType} from '@openstapps/core'; import {Bar} from 'cli-progress'; -import {Client} from './client.js'; -import {ConnectorClient} from './connector-client.js'; -import {OutOfRangeError} from './errors.js'; -import {HttpClientInterface} from './http-client-interface.js'; +import {Client, ConnectorClient, OutOfRangeError, HttpClientInterface} from '@openstapps/api'; /** * Options to set up copying data from one backend to another @@ -57,7 +53,6 @@ export interface CopyOptions { /** * Copy data for a StAppsCore type from one backend to another - * * @param client HTTP client * @param options Map of options */ @@ -91,12 +86,16 @@ export async function copy(client: HttpClientInterface, options: CopyOptions): P do { try { ({searchRequest, searchResponse} = await apiIn.searchNext(searchRequest, searchResponse)); + const things = searchResponse.data; - await asyncPool(ConnectorClient.ITEM_CONCURRENT_LIMIT, searchResponse.data, async item => { - progressBar.increment(1); - - return bulk.add(item); - }); + await Promise.all( + Array.from({length: ConnectorClient.ITEM_CONCURRENT_LIMIT}).map(async () => { + for (let item = things.shift(); item !== undefined; item = things.shift()) { + progressBar.increment(1); + await bulk.add(item); + } + }), + ); } catch (error) { if (error instanceof OutOfRangeError) { outOfRange = true; diff --git a/packages/api/src/e2e.ts b/packages/api-cli/src/e2e.ts similarity index 97% rename from packages/api/src/e2e.ts rename to packages/api-cli/src/e2e.ts index fc435932..26b35668 100644 --- a/packages/api/src/e2e.ts +++ b/packages/api-cli/src/e2e.ts @@ -20,8 +20,7 @@ import {deepStrictEqual} from 'assert'; import {readdir, readFile} from 'fs'; import path from 'path'; import {promisify} from 'util'; -import {ConnectorClient} from './connector-client.js'; -import {HttpClientInterface} from './http-client-interface.js'; +import {ConnectorClient, HttpClientInterface} from '@openstapps/api'; const localItemMap: Map = new Map(); const remoteItemMap: Map = new Map(); @@ -137,7 +136,6 @@ async function indexSamples(api: ConnectorClient, options: E2EOptions): Promise< /** * Get all SCThings from the predefined core test json files - * * @param samplesDirectory Filepath to the directory containing to the core test json files * @returns an Array of all the SCThings specified for test usage */ diff --git a/packages/api/test/copy.spec.ts b/packages/api-cli/test/copy.spec.ts similarity index 84% rename from packages/api/test/copy.spec.ts rename to packages/api-cli/test/copy.spec.ts index 47efd8d5..63b26dae 100644 --- a/packages/api/test/copy.spec.ts +++ b/packages/api-cli/test/copy.spec.ts @@ -27,9 +27,21 @@ import { import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; import chaiSpies from 'chai-spies'; -import moment from 'moment'; -import {copy, ApiError, HttpClient, RequestOptions, Response} from '../src/index.js'; -import {RecursivePartial} from './client.spec.js'; +import {ApiError, HttpClient, HttpClientRequest, HttpClientResponse} from '@openstapps/api'; +import {copy} from '../src/copy.js'; + +/** + * Recursive Partial + * + * @see https://stackoverflow.com/a/51365037 + */ +export type RecursivePartial = { + [P in keyof T]?: T[P] extends Array + ? Array> + : T[P] extends object + ? RecursivePartial + : T[P]; +}; chai.should(); chai.use(chaiSpies); @@ -50,12 +62,14 @@ describe('Copy', function () { }); it('should copy', async function () { - type responses = Response; + type responses = HttpClientResponse< + SCBulkAddResponse | SCBulkDoneResponse | SCBulkResponse | SCSearchResponse + >; sandbox.on( httpClient, 'request', - async (request: RequestOptions): Promise> => { + async (request: HttpClientRequest): Promise> => { if (request.url.toString() === 'http://foo.bar' + searchRoute.getUrlPath().toString()) { const body = request.body as SCSearchRequest; @@ -71,7 +85,7 @@ describe('Copy', function () { categories: ['main dish'], name: 'foobar', origin: { - indexed: moment().format(), + indexed: new Date(Date.now()).toISOString(), name: 'bar', }, type: SCThingType.Dish, @@ -131,12 +145,14 @@ describe('Copy', function () { }); it('should fail to copy', async function () { - type responses = Response; + type responses = HttpClientResponse< + SCBulkAddResponse | SCBulkDoneResponse | SCBulkResponse | SCSearchResponse + >; sandbox.on( httpClient, 'request', - async (request: RequestOptions): Promise> => { + async (request: HttpClientRequest): Promise> => { if (request.url.toString() === 'http://foo.bar' + searchRoute.getUrlPath().toString()) { const body = request.body as SCSearchRequest; @@ -151,7 +167,7 @@ describe('Copy', function () { categories: ['main dish'], name: 'foobar', origin: { - indexed: moment().format(), + indexed: new Date(Date.now()).toISOString(), name: 'bar', }, type: SCThingType.Dish, diff --git a/packages/api/test/e2e.spec.ts b/packages/api-cli/test/e2e.spec.ts similarity index 88% rename from packages/api/test/e2e.spec.ts rename to packages/api-cli/test/e2e.spec.ts index d704992d..6a2b65ca 100644 --- a/packages/api/test/e2e.spec.ts +++ b/packages/api-cli/test/e2e.spec.ts @@ -27,15 +27,15 @@ import { import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; import chaiSpies from 'chai-spies'; -import clone = require('rfdc'); import {existsSync, mkdirSync, rmdirSync, unlinkSync} from 'fs'; import {createFileSync} from 'fs-extra'; -// eslint-disable-next-line unicorn/prevent-abbreviations -import {e2eRun, getItemsFromSamples, ApiError, HttpClient, RequestOptions, Response} from '../src/index.js'; -import {RecursivePartial} from './client.spec.js'; +import {ApiError, HttpClient, HttpClientRequest, HttpClientResponse} from '@openstapps/api'; +import {RecursivePartial} from './copy.spec.js'; import {expect} from 'chai'; import path from 'path'; import {fileURLToPath} from 'url'; +// eslint-disable-next-line unicorn/prevent-abbreviations +import {e2eRun, getItemsFromSamples} from '../src/e2e.js'; chai.should(); chai.use(chaiSpies); @@ -68,7 +68,9 @@ describe('e2e Connector', function () { }); it('should run e2e simulation', async function () { - type responses = Response; + type responses = HttpClientResponse< + SCBulkAddResponse | SCBulkDoneResponse | SCBulkResponse | SCSearchResponse + >; let failOnCompare = false; let failOnLookup = false; @@ -76,7 +78,7 @@ describe('e2e Connector', function () { sandbox.on( httpClient, 'request', - async (request: RequestOptions): Promise> => { + async (request: HttpClientRequest): Promise> => { if (request.url.toString() === `http://localhost${bulkRoute.getUrlPath().toString()}`) { return { body: { @@ -90,7 +92,8 @@ describe('e2e Connector', function () { if ( request.url.toString() === `http://localhost${bulkAddRoute.getUrlPath({UID: 'foo'}).toString()}` ) { - storedThings.set(request.body.uid, clone()(request.body)); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + storedThings.set((request.body as any).uid, JSON.parse(JSON.stringify(request.body))); return { body: {}, @@ -108,7 +111,8 @@ describe('e2e Connector', function () { } if (request.url.toString() === `http://localhost${searchRoute.getUrlPath().toString()}`) { - const thing = storedThings.get(request.body.filter.arguments.value); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const thing = storedThings.get((request.body as any).filter.arguments.value); if (failOnCompare) { thing!.origin!.modified = 'altered'; } @@ -163,7 +167,7 @@ describe('e2e Connector', function () { }); it('should fail to index', async function () { - type responses = Response; + type responses = HttpClientResponse; sandbox.on(httpClient, 'request', async (): Promise> => { return { diff --git a/packages/api-cli/tsconfig.json b/packages/api-cli/tsconfig.json new file mode 100644 index 00000000..579a39ff --- /dev/null +++ b/packages/api-cli/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@openstapps/tsconfig" +} diff --git a/packages/api-plugin/LICENSE b/packages/api-plugin/LICENSE new file mode 100644 index 00000000..9df63ccc --- /dev/null +++ b/packages/api-plugin/LICENSE @@ -0,0 +1,200 @@ +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS + +0. Definitions. +"This License" refers to version 3 of the GNU General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based on the Program. + +To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. +A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: +a) The work must carry prominent notices stating that you modified it, and giving a relevant date. +b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". +c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. +d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: +a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. +b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. +c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. +d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. +e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + +a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or +b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or +c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or +d) Limiting the use for publicity purposes of names of licensors or authors of the material; or +e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or +f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. +All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. +10. Automatic Licensing of Downstream Recipients. +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. +An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. +A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". +A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. +13. Use with the GNU Affero General Public License. +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. +14. Revised Versions of this License. +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +16. Limitation of Liability. +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +17. Interpretation of Sections 15 and 16. +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + +Copyright (C) + +This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + Copyright (C) +This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. +This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". + +You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/packages/api-plugin/README.md b/packages/api-plugin/README.md new file mode 100644 index 00000000..e69de29b diff --git a/packages/api-plugin/package.json b/packages/api-plugin/package.json new file mode 100644 index 00000000..7c39921e --- /dev/null +++ b/packages/api-plugin/package.json @@ -0,0 +1,82 @@ +{ + "name": "@openstapps/api-plugin", + "description": "Node.js library to interact with the StApps backend service", + "version": "2.1.0", + "type": "module", + "license": "GPL-3.0-only", + "repository": "git@gitlab.com:openstapps/api.git", + "author": "Karl-Philipp Wulfert ", + "contributors": [ + "André Michael Thomas Bierlein", + "Anselm Stordeur ", + "Jovan Krunić ", + "Michel Jonathan Schmitz", + "Rainer Killinger ", + "Roman Klopsch", + "Thea Schöbl " + ], + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "build": "tsup --dts", + "docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts", + "format": "prettier . -c --ignore-path ../../.gitignore", + "format:fix": "prettier --write . --ignore-path ../../.gitignore", + "lint": "eslint --ext .ts src/", + "lint:fix": "eslint --fix --ext .ts src/", + "test": "c8 mocha" + }, + "dependencies": { + "@openstapps/api": "workspace:*", + "@openstapps/core": "workspace:*", + "@openstapps/core-tools": "workspace:*", + "@openstapps/logger": "workspace:*", + "@types/body-parser": "1.19.2", + "@types/express": "4.17.17", + "@types/json-schema": "7.0.11", + "@types/morgan": "1.9.4", + "body-parser": "1.20.2", + "express": "4.18.2", + "json-schema": "0.4.0", + "morgan": "1.10.0" + }, + "devDependencies": { + "@openstapps/eslint-config": "workspace:*", + "@openstapps/prettier-config": "workspace:*", + "@openstapps/tsconfig": "workspace:*", + "@types/chai": "4.3.5", + "@types/chai-as-promised": "7.1.5", + "@types/chai-spies": "1.0.3", + "@types/mocha": "10.0.1", + "c8": "7.14.0", + "chai": "4.3.7", + "chai-as-promised": "7.1.1", + "chai-spies": "1.0.0", + "conventional-changelog-cli": "2.2.2", + "mocha": "10.2.0", + "nock": "13.3.1", + "ts-node": "10.9.1", + "tsup": "6.7.0", + "typedoc": "0.24.7", + "typescript": "4.9.5" + }, + "peerDependencies": { + "@openstapps/core": "workspace:*" + }, + "tsup": { + "entry": [ + "src/app.ts", + "src/index.ts" + ], + "sourcemap": true, + "clean": true, + "format": "esm", + "outDir": "lib" + }, + "prettier": "@openstapps/prettier-config", + "eslintConfig": { + "extends": [ + "@openstapps" + ] + } +} diff --git a/packages/api-plugin/src/index.ts b/packages/api-plugin/src/index.ts new file mode 100644 index 00000000..68859553 --- /dev/null +++ b/packages/api-plugin/src/index.ts @@ -0,0 +1,2 @@ +export * from './plugin.js'; +export * from './plugin-client.js'; diff --git a/packages/api/src/plugin-client.ts b/packages/api-plugin/src/plugin-client.ts similarity index 97% rename from packages/api/src/plugin-client.ts rename to packages/api-plugin/src/plugin-client.ts index b9b88598..b5f456bf 100644 --- a/packages/api/src/plugin-client.ts +++ b/packages/api-plugin/src/plugin-client.ts @@ -13,7 +13,7 @@ * this program. If not, see . */ import {SCPluginRegisterRequest, SCPluginRegisterRoute} from '@openstapps/core'; -import {ConnectorClient} from './connector-client.js'; +import {ConnectorClient} from '@openstapps/api'; import {Plugin} from './plugin.js'; /** @@ -28,7 +28,6 @@ export class PluginClient extends ConnectorClient { * **This method automatically calls [[Plugin.start]]** * You need to call this method before you can do anything with the plugin. If you want to register the plugin again, * you might first want to inform yourself how the backend behaves in such cases TODO: add docs for this - * * @param plugin The instance of the plugin you want to register */ async registerPlugin(plugin: Plugin) { @@ -54,7 +53,6 @@ export class PluginClient extends ConnectorClient { * **This method automatically calls [[Plugin.stop]]** * If you want to unregister your plugin for some reason, you can do so by calling this method. * Use with caution.* - * * @param plugin The instance of the plugin you want to register */ async unregisterPlugin(plugin: Plugin) { diff --git a/packages/api/src/plugin.ts b/packages/api-plugin/src/plugin.ts similarity index 97% rename from packages/api/src/plugin.ts rename to packages/api-plugin/src/plugin.ts index 306d8f19..ab56d8f0 100644 --- a/packages/api/src/plugin.ts +++ b/packages/api-plugin/src/plugin.ts @@ -72,7 +72,6 @@ export abstract class Plugin { /** * Normalize a port into a number, string, or false. - * * @param value the port you want to normalize */ protected static normalizePort(value: string) { @@ -100,7 +99,6 @@ export abstract class Plugin { * * Don't forget to call [[PluginClient.registerPlugin]]! * Refer to the examples for how to use the schemas. TODO: examples - * * @param port The port of the plugin * @param name The name of the plugin * @param url The url of the plugin without the port or anything else, for example `http://localhost` @@ -125,7 +123,7 @@ export abstract class Plugin { this.app.use(bodyParser.json()); this.port = Plugin.normalizePort( /* istanbul ignore next */ - typeof process.env.PORT === 'undefined' ? port.toString() : process.env.PORT, + process.env.PORT === undefined ? port.toString() : process.env.PORT, ); this.app.set('port', this.port); @@ -160,7 +158,6 @@ export abstract class Plugin { /** * Event listener for HTTP server "error" event. - * * @param error The error that occurred */ @@ -206,7 +203,6 @@ export abstract class Plugin { * When the route gets invoked * * Override this method for your own plugin - * * @param request An express Request from the backend * @param response An express Response to the backend for you to send back data */ @@ -222,7 +218,7 @@ export abstract class Plugin { return new Promise((resolve, reject) => { this.server.close(error => { /* istanbul ignore next */ - if (typeof error !== 'undefined') { + if (error !== undefined) { /* istanbul ignore next */ reject(error); } @@ -248,7 +244,7 @@ export abstract class Plugin { * If the plugin is not started, it will return 404 on any route */ public stop() { - // you can't unregister routes from express. So this is a workaround. + // You can't unregister routes from express. So this is a workaround. this.active = false; } } diff --git a/packages/api/test/plugin-client.spec.ts b/packages/api-plugin/test/plugin-client.spec.ts similarity index 96% rename from packages/api/test/plugin-client.spec.ts rename to packages/api-plugin/test/plugin-client.spec.ts index b3739ccc..b0e4897d 100644 --- a/packages/api/test/plugin-client.spec.ts +++ b/packages/api-plugin/test/plugin-client.spec.ts @@ -16,7 +16,8 @@ import {SCPluginRegisterRequest, SCPluginRegisterResponse, SCPluginRegisterRoute import chai from 'chai'; import {expect} from 'chai'; import chaiSpies from 'chai-spies'; -import {HttpClient, HttpClientResponse, PluginClient} from '../src/index.js'; +import {HttpClient, HttpClientResponse} from '@openstapps/api'; +import {PluginClient} from '../src/index.js'; import {TestPlugin} from './plugin-resources/test-plugin.js'; chai.use(chaiSpies); diff --git a/packages/api/test/plugin-resources/test-plugin-response.ts b/packages/api-plugin/test/plugin-resources/test-plugin-response.ts similarity index 100% rename from packages/api/test/plugin-resources/test-plugin-response.ts rename to packages/api-plugin/test/plugin-resources/test-plugin-response.ts diff --git a/packages/api/test/plugin-resources/test-plugin.ts b/packages/api-plugin/test/plugin-resources/test-plugin.ts similarity index 89% rename from packages/api/test/plugin-resources/test-plugin.ts rename to packages/api-plugin/test/plugin-resources/test-plugin.ts index a8b3404b..9c2f7330 100644 --- a/packages/api/test/plugin-resources/test-plugin.ts +++ b/packages/api-plugin/test/plugin-resources/test-plugin.ts @@ -24,8 +24,8 @@ import {Plugin} from '../../src/plugin.js'; */ export class TestPlugin extends Plugin { // tslint:disable-next-line: completed-docs prefer-function-over-method - protected async onRouteInvoke(_req: express.Request, res: express.Response): Promise { - res.json({}); + protected async onRouteInvoke(_request: express.Request, response: express.Response): Promise { + response.json({}); return undefined; } diff --git a/packages/api/test/plugin.spec.ts b/packages/api-plugin/test/plugin.spec.ts similarity index 89% rename from packages/api/test/plugin.spec.ts rename to packages/api-plugin/test/plugin.spec.ts index f6d04c29..93ab6420 100644 --- a/packages/api/test/plugin.spec.ts +++ b/packages/api-plugin/test/plugin.spec.ts @@ -12,12 +12,11 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ - import {Converter} from '@openstapps/core-tools'; import chai from 'chai'; import {expect} from 'chai'; import chaiSpies from 'chai-spies'; -import {HttpClient} from '../src/index.js'; +import {HttpClient} from '@openstapps/api'; import {TestPlugin} from './plugin-resources/test-plugin.js'; import path from 'path'; import {readFile} from 'fs/promises'; @@ -39,6 +38,7 @@ describe('Plugin', function () { this.timeout(20_000); let testPlugin: TestPlugin; + let constructTestPlugin: TestPlugin | undefined; beforeEach(function () { testPlugin = new TestPlugin( @@ -59,7 +59,11 @@ describe('Plugin', function () { }); afterEach(async function () { - await testPlugin.close(); + try { + await testPlugin.close(); + await constructTestPlugin?.close(); + } catch {} + constructTestPlugin = undefined; sandbox.restore(); }); @@ -73,11 +77,11 @@ describe('Plugin', function () { return {$id: schemaName}; }); - const constructTestPlugin = new TestPlugin( + constructTestPlugin = new TestPlugin( 4001, 'A', 'http://B', - '/C', // this doesn't matter for our tests, it's only something that affects the backend + '/C', // This doesn't matter for our tests. It's only something that affects the backend 'http://D', converter, 'PluginTestRequest', @@ -97,19 +101,19 @@ describe('Plugin', function () { expect(constructTestPlugin.responseSchema.$id).to.be.equal('PluginTestResponse'); sandbox.on(constructTestPlugin, 'onRouteInvoke'); - await httpClient.request({ - url: new URL('http://localhost:4001'), - }); + + try { + await httpClient.request({ + url: new URL('http://localhost:4001'), + }); + } catch {} // onRouteInvoke is a protected method, but we need to access it from the outside to test it // @ts-expect-error protected method expect(constructTestPlugin.onRouteInvoke).not.to.have.been.called(); - - await constructTestPlugin.close(); - sandbox.restore(constructTestPlugin, 'onRouteInvoke'); }); it('should have full url', async function () { - const constructTestPlugin = new TestPlugin( + constructTestPlugin = new TestPlugin( 4001, '', 'http://B', diff --git a/packages/api-plugin/tsconfig.json b/packages/api-plugin/tsconfig.json new file mode 100644 index 00000000..579a39ff --- /dev/null +++ b/packages/api-plugin/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@openstapps/tsconfig" +} diff --git a/packages/api/.editorconfig b/packages/api/.editorconfig deleted file mode 100644 index 9a4062a7..00000000 --- a/packages/api/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -# editorconfig.org - -root = true - -[*] -indent_style = space -indent_size = 2 - -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/packages/api/.eslintignore b/packages/api/.eslintignore deleted file mode 100644 index 3d0a9346..00000000 --- a/packages/api/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -resources -openapi diff --git a/packages/api/.eslintrc.json b/packages/api/.eslintrc.json deleted file mode 100644 index 31d47702..00000000 --- a/packages/api/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@openstapps" -} diff --git a/packages/api/.gitignore b/packages/api/.gitignore deleted file mode 100644 index c07b9dc8..00000000 --- a/packages/api/.gitignore +++ /dev/null @@ -1,91 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# next.js build output -.next - -# nuxt.js build output -.nuxt - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -#DynamoDB Local files -.dynamodb/ - -########## end of https://github.com/github/gitignore/blob/master/Node.gitignore - -# ignore ide files -.idea -.vscode - -# ignore lib -lib - -# ignore docs -docs diff --git a/packages/api/.npmignore b/packages/api/.npmignore deleted file mode 100644 index 87e0b4cf..00000000 --- a/packages/api/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -# Ignore all files/folders by default -# See https://stackoverflow.com/a/29932318 -/* -# Except these files/folders -!lib -lib/tsconfig.tsbuildinfo -!LICENSE -!package.json -!package-lock.json -!README.md -!src diff --git a/packages/api/README.md b/packages/api/README.md index a43b473b..49e563a9 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -4,64 +4,4 @@ Node.js library to interact with the StApps backend service ## Use this as a standalone program -To get some data into a local `backend-node`-instance, you can run this -as a standalone program to copy data of a remote `backend-node`-instance -into your local one. - -Example to copy all Events of the b-tu instance: - -```shell -npm install -npm run build -node ./lib/cli.js copy Event https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100 -``` - -Example to index all items from @openstapps/core test files to a backend: - -```shell -npm install -npm run build -node ./lib/cli.js e2e http://localhost:3000 -``` - -### Program arguments - -```shell -node ./lib/cli.js copy - -node ./lib/cli.js e2e -``` - -#### Options - -The source identifier for the bulk to use with the target instance (default is 'copy') - -```shell --s, --bulkSource -``` - -The App version to use (unset by default) - -```shell --a, --appVersion -``` - -The only available option for `e2e` command. File path to json test files each containing a SCThing. - -```shell --s, --samples -``` - -### Example execution - -with docker when backend is running on `localhost:3000`: - -```shell -docker run --net=host registry.gitlab.com/openstapps/api/cli copy Place https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100 -``` - -Or using `e2e` command: - -```shell -docker run --net=host registry.gitlab.com/openstapps/api/cli e2e http://localhost:3000 -``` +See `@openstapps/api-cli` diff --git a/packages/api/package.json b/packages/api/package.json index de84b4e9..4c84adcb 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -17,9 +17,6 @@ ], "main": "lib/index.js", "types": "lib/index.d.ts", - "bin": { - "openstapps-api": "app.js" - }, "scripts": { "build": "tsup --dts", "docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts", @@ -30,56 +27,32 @@ "test": "c8 mocha" }, "dependencies": { - "@krlwlfrt/async-pool": "0.7.0", "@openstapps/core": "workspace:*", - "@openstapps/core-tools": "workspace:*", - "@openstapps/logger": "workspace:*", - "@types/cli-progress": "3.11.0", - "@types/express": "4.17.17", - "@types/morgan": "1.9.4", - "@types/node": "18.15.3", - "@types/traverse": "0.6.32", "@types/uuid": "8.3.4", - "@types/wait-on": "5.3.1", - "body-parser": "1.20.2", - "cli-progress": "3.12.0", - "commander": "10.0.0", - "express": "4.18.2", - "got": "12.6.0", - "json-schema": "0.4.0", - "moment": "2.29.4", - "morgan": "1.10.0", - "rfdc": "1.3.0", - "traverse": "0.6.7", - "uuid": "8.3.2", - "wait-on": "6.0.1" + "uuid": "8.3.2" }, "devDependencies": { "@openstapps/eslint-config": "workspace:*", - "@openstapps/nyc-config": "workspace:*", "@openstapps/prettier-config": "workspace:*", "@openstapps/tsconfig": "workspace:*", - "@types/body-parser": "1.19.2", "@types/chai": "4.3.5", "@types/chai-as-promised": "7.1.5", "@types/chai-spies": "1.0.3", - "@types/cli-progress": "3.11.0", - "@types/express": "4.17.17", - "@types/fs-extra": "9.0.13", - "@types/json-schema": "7.0.11", "@types/mocha": "10.0.1", + "@types/traverse": "0.6.32", + "undici": "5.22.1", "c8": "7.14.0", "chai": "4.3.7", "chai-as-promised": "7.1.1", "chai-spies": "1.0.0", "conventional-changelog-cli": "2.2.2", - "fs-extra": "10.1.0", + "date-fns": "2.30.0", "mocha": "10.2.0", - "nock": "13.3.1", + "traverse": "0.6.7", "ts-node": "10.9.1", "tsup": "6.7.0", "typedoc": "0.24.7", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "peerDependencies": { "@openstapps/core": "workspace:*" diff --git a/packages/api/src/bulk.ts b/packages/api/src/bulk.ts index 899ceef1..072fb308 100644 --- a/packages/api/src/bulk.ts +++ b/packages/api/src/bulk.ts @@ -42,7 +42,6 @@ export class Bulk { /** * **!!! Bulk should only be instantiated by Client !!!** - * * @see Client.bulk */ constructor( @@ -55,7 +54,6 @@ export class Bulk { /** * Add a thing to the bulk - * * @param thing Thing to add to the bulk */ async add(thing: T): Promise { diff --git a/packages/api/src/client.ts b/packages/api/src/client.ts index 13c071aa..0e44faff 100644 --- a/packages/api/src/client.ts +++ b/packages/api/src/client.ts @@ -67,7 +67,6 @@ export class Client { /** * Create a new search request with altered pagination parameters to move to the next result window - * * @param searchRequest Last search request * @param searchResponse Search response for supplied search request * @throws OutOfRangeError Throws an error if the next window is beyond the total number of results @@ -90,7 +89,6 @@ export class Client { /** * Instantiate a new StApps-API client to communicate with a StApps-backend. - * * @param httpClient HTTP client to use * @param url URL of the backend * @param version App version to use when requesting data *(only necessary if URL is ambiguous)* @@ -112,7 +110,6 @@ export class Client { /** * Get a thing by its UID - * * @param uid UID of the thing to fetch */ async getThing(uid: string): Promise { @@ -136,7 +133,6 @@ export class Client { /** * Make a handshake with the backend and check StAppsCore version - * * @param coreVersion StAppsCore version to check */ async handshake(coreVersion: string): Promise { @@ -155,22 +151,21 @@ export class Client { /** * Invoke a plugin route - * * @param name name of the plugin * @param parameters Parameters for the URL fragment * @param body Body for the request */ async invokePlugin(name: string, parameters?: {[k: string]: string}, body?: SCRequests): Promise { - if (typeof this.supportedFeatures === 'undefined') { + if (this.supportedFeatures === undefined) { const request: SCIndexRequest = {}; const response = await this.invokeRoute(this.indexRoute, undefined, request); - if (typeof response?.app?.features !== 'undefined') { + if (response?.app?.features !== undefined) { /* istanbul ignore next */ this.supportedFeatures = response?.app?.features; } } const pluginInfo: SCFeatureConfigurationPlugin | undefined = this.supportedFeatures?.plugins?.[name]; - if (typeof pluginInfo === 'undefined') { + if (pluginInfo === undefined) { throw new PluginNotAvailableError(name); } @@ -182,7 +177,6 @@ export class Client { /** * Invoke a route - * * @param route Route to invoke * @param parameters Parameters for the URL fragment * @param body Body for the request @@ -212,7 +206,6 @@ export class Client { * Send a multi search request to the backend * * All results will be returned for requests where no size is set. - * * @param multiSearchRequest Multi search request */ async multiSearch(multiSearchRequest: SCMultiSearchRequest): Promise { @@ -223,7 +216,7 @@ export class Client { for (const key of Object.keys(multiSearchRequest)) { const searchRequest = multiSearchRequest[key]; - if (typeof searchRequest.size === 'undefined') { + if (searchRequest.size === undefined) { preFlightRequest[key] = { ...searchRequest, }; @@ -265,13 +258,12 @@ export class Client { * Send a search request to the backend * * All results will be returned if no size is set in the request. - * * @param searchRequest Search request */ async search(searchRequest: SCSearchRequest): Promise { let size: number | undefined = searchRequest.size; - if (typeof size === 'undefined') { + if (size === undefined) { const preFlightResponse = await this.invokeRoute(this.searchRoute, undefined, { ...searchRequest, size: 0, @@ -288,7 +280,6 @@ export class Client { /** * Get the next search results - * * @param searchRequest Last search request * @param searchResponse Search response for supplied search request */ diff --git a/packages/api/src/connector-client.ts b/packages/api/src/connector-client.ts index a287ae19..202ca1b8 100644 --- a/packages/api/src/connector-client.ts +++ b/packages/api/src/connector-client.ts @@ -12,7 +12,6 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -import {asyncPool} from '@krlwlfrt/async-pool/lib/async-pool.js'; import { isThing, SCAssociatedThingWithoutReferences, @@ -25,8 +24,6 @@ import { SCThingUpdateResponse, SCThingUpdateRoute, } from '@openstapps/core'; -import moment from 'moment'; -import clone from 'rfdc'; import {v5} from 'uuid'; import {Bulk} from './bulk.js'; import {Client} from './client.js'; @@ -61,12 +58,11 @@ export class ConnectorClient extends Client { * * Note: valid namespace IDs are license plates of StApps universities. * See documentation of `NAMESPACES` for valid namespace IDs.* - * * @param uid UID to make UUID from * @param namespaceId Namespace ID to use to make UUID */ static makeUUID(uid: string, namespaceId: SCLicensePlate): string { - if (typeof SCNamespaces[namespaceId] === 'undefined') { + if (SCNamespaces[namespaceId] === undefined) { throw new NamespaceNotDefinedError(namespaceId); } @@ -77,12 +73,10 @@ export class ConnectorClient extends Client { * Remove fields from a thing that are references * * This effectively turns a thing into a thing without references, e.g. SCDish into SCDishWithoutReferences. - * * @param thing Thing to remove references from */ static removeReferences(thing: THING): SCAssociatedThingWithoutReferences { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const thingWithoutReferences = clone()(thing); + const thingWithoutReferences = JSON.parse(JSON.stringify(thing)); delete thingWithoutReferences.origin; @@ -145,7 +139,6 @@ export class ConnectorClient extends Client { /** * Recursively deletes all undefined properties from an object instance - * * @param object Object to delete undefined properties from */ static removeUndefinedProperties(object: object): void { @@ -163,7 +156,7 @@ export class ConnectorClient extends Client { const indexedObject = object as {[k: string]: unknown}; - if (typeof indexedObject[key] === 'undefined') { + if (indexedObject[key] === undefined) { // delete undefined keyss delete indexedObject[key]; } else { @@ -180,17 +173,17 @@ export class ConnectorClient extends Client { * * This uses the Bulk API supplied by the backend and returns an object that can be used * just like the client itself, while handling the information necessary in bulk transfers. - * * @param type StAppsCore thing type * @param source Source identifier (should be unique per actual data source) * @param timeout Timeout in seconds when the bulk should expire */ async bulk(type: SCThingType, source: string, timeout?: number): Promise> { - // set default value for timeout to one hour - const bulkTimeout = typeof timeout === 'number' ? timeout : ConnectorClient.BULK_TIMEOUT; + // set the default value for timeout to one hour + const expiration = new Date(); + expiration.setSeconds(expiration.getSeconds() + (timeout ?? ConnectorClient.BULK_TIMEOUT)); const bulkData = await this.invokeRoute(this.bulkRoute, undefined, { - expiration: moment().add(bulkTimeout, 'seconds').format(), + expiration: expiration.toISOString(), source: source, type: type, }); @@ -203,7 +196,6 @@ export class ConnectorClient extends Client { * * Note that source is optional but is set to `'stapps-api'` in that case. * This will override any previous bulk that you indexed with that source. - * * @param things List of things to index * @param source Source of the things * @param timeout Timeout of the bulk in seconds @@ -216,13 +208,19 @@ export class ConnectorClient extends Client { } // set the default source if none is given - const thingSource = typeof source === 'undefined' ? 'stapps-api' : source; + const thingSource = source === undefined ? 'stapps-api' : source; // request a new bulk const bulk = await this.bulk(things[0].type, thingSource, timeout); // add items to the bulk - 5 concurrently - await asyncPool(ConnectorClient.ITEM_CONCURRENT_LIMIT, things, thing => bulk.add(thing)); + await Promise.all( + Array.from({length: ConnectorClient.ITEM_CONCURRENT_LIMIT}).map(async () => { + for (let thing = things.pop(); thing !== undefined; thing = things.pop()) { + await bulk.add(thing); + } + }), + ); // close bulk await bulk.done(); @@ -230,7 +228,6 @@ export class ConnectorClient extends Client { /** * Update an existing StAppsCore thing - * * @param thing StAppsCore thing to update */ async update(thing: SCThings): Promise { diff --git a/packages/api/src/errors.ts b/packages/api/src/errors.ts index 75a5c59e..547b0616 100644 --- a/packages/api/src/errors.ts +++ b/packages/api/src/errors.ts @@ -20,7 +20,6 @@ import {SCErrorResponse, SCLicensePlate, SCSearchRequest, SCThings} from '@opens export class ApiError extends Error { /** * Instantiate a new error - * * @param data Representation of an error that happened in the backend */ constructor(protected data: Partial) { @@ -38,12 +37,12 @@ export class ApiError extends Error { let string_ = super.toString(); // add additional data - if (typeof this.data.additionalData !== 'undefined') { + if (this.data.additionalData !== undefined) { string_ += `\n\n${JSON.stringify(this.data.additionalData)}`; } // add "remote" stack trace - if (typeof this.data.stack !== 'undefined') { + if (this.data.stack !== undefined) { string_ += `\n\n${this.data.stack}`; } @@ -57,7 +56,6 @@ export class ApiError extends Error { export class OutOfRangeError extends ApiError { /** * Instantiate a new error - * * @param searchRequest Search request where window is out of range */ constructor(searchRequest: SCSearchRequest) { @@ -75,7 +73,6 @@ export class OutOfRangeError extends ApiError { export class BulkWithMultipleTypesError extends ApiError { /** * Instantiate a new error - * * @param offendingThing Thing that has a different type than the previous things */ constructor(offendingThing: SCThings) { diff --git a/packages/api/src/http-client-interface.ts b/packages/api/src/http-client-interface.ts index 69f6b2cb..c408de0b 100644 --- a/packages/api/src/http-client-interface.ts +++ b/packages/api/src/http-client-interface.ts @@ -20,7 +20,6 @@ import {SCErrorResponse, SCRequests, SCResponses} from '@openstapps/core'; export interface HttpClientInterface { /** * Send request - * * @param request Request to send */ request(request: HttpClientRequest): Promise>; diff --git a/packages/api/src/http-client.ts b/packages/api/src/http-client.ts index 27bf7892..30950175 100644 --- a/packages/api/src/http-client.ts +++ b/packages/api/src/http-client.ts @@ -12,75 +12,34 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -import got, {OptionsOfJSONResponseBody, Response as GotResponse} from 'got'; - -/** - * Request options that requires a url - * Note: adjust request options of got library for backward compatibility - */ -export interface RequestOptions extends Omit { - /** - * Body of the request - */ - // TODO: Use a specific type? - // eslint-disable-next-line @typescript-eslint/no-explicit-any - body?: any; - /** - * Target URL of the request - */ - url: URL; -} - -/** - * Response with generic for the type of body that is returned from the request - */ -export interface Response extends GotResponse { - /** - * Typed body of the response - */ - body: TYPE_OF_BODY; -} +import type {HttpClientInterface, HttpClientRequest, HttpClientResponse} from './http-client-interface.js'; +import type {SCResponses} from '@openstapps/core'; /** * HTTP client that is based on request */ -export class HttpClient { +export class HttpClient implements HttpClientInterface { /** * Make a request - * * @param requestConfig Configuration of the request */ - async request(requestConfig: RequestOptions): Promise> { - const parameters: OptionsOfJSONResponseBody = { - followRedirect: true, - method: 'GET', - responseType: 'json', + async request(requestConfig: HttpClientRequest): Promise> { + const parameters: RequestInit = { + method: requestConfig.method ?? 'GET', + headers: requestConfig.headers ?? {}, }; - if (typeof requestConfig.body !== 'undefined') { - parameters.json = requestConfig.body; + if (requestConfig.body !== undefined) { + (parameters.headers as Record)['Content-Type'] = 'application/json'; + parameters.body = JSON.stringify(requestConfig.body); } - if (typeof requestConfig.headers !== 'undefined') { - parameters.headers = requestConfig.headers; - } + const response = await fetch(requestConfig.url, parameters); - if (typeof requestConfig.method !== 'undefined') { - parameters.method = requestConfig.method; - } - let response: Response; - try { - response = await got(requestConfig.url.toString(), parameters); - } catch (error) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (typeof (error as any).response === 'undefined') { - throw error; - } - // if there is a response (e.g. response with statusCode 404 etc.) provide it - // eslint-disable-next-line @typescript-eslint/no-explicit-any - response = (error as any).response as Response; - } - - return response; + return { + body: await response.json().catch(() => response.text().catch(() => undefined)), + headers: response.headers, + statusCode: response.status, + }; } } diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts index f70f1dc9..ff3b4a06 100644 --- a/packages/api/src/index.ts +++ b/packages/api/src/index.ts @@ -1,10 +1,6 @@ export * from './bulk.js'; export * from './client.js'; export * from './connector-client.js'; -export * from './copy.js'; -export * from './e2e.js'; export * from './errors.js'; export * from './http-client.js'; export * from './http-client-interface.js'; -export * from './plugin.js'; -export * from './plugin-client.js'; diff --git a/packages/api/test/bulk.spec.ts b/packages/api/test/bulk.spec.ts index 49d3678d..ce361a2e 100644 --- a/packages/api/test/bulk.spec.ts +++ b/packages/api/test/bulk.spec.ts @@ -24,8 +24,8 @@ import {expect} from 'chai'; import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; import chaiSpies from 'chai-spies'; -import moment from 'moment'; import {HttpClient, Bulk, Client, BulkWithMultipleTypesError} from '../src/index.js'; +import {addHours} from 'date-fns'; chai.should(); chai.use(chaiSpies); @@ -50,9 +50,10 @@ describe('Bulk', function () { }); expect(client.invokeRoute).not.to.have.been.called(); + const expiration = addHours(new Date(), 1).toISOString(); const bulk = new Bulk(SCThingType.Dish, client, { - expiration: moment().add(3600, 'seconds').format(), + expiration, source: 'foo', state: 'in progress', type: SCThingType.Dish, @@ -63,7 +64,7 @@ describe('Bulk', function () { categories: ['main dish'], name: 'foobar', origin: { - indexed: moment().format(), + indexed: new Date().toISOString(), name: 'bar', type: SCThingOriginType.Remote, }, @@ -84,7 +85,7 @@ describe('Bulk', function () { it('should fail add', async function () { const bulk = new Bulk(SCThingType.Dish, client, { - expiration: moment().add(3600, 'seconds').format(), + expiration: addHours(new Date(), 1).toISOString(), source: 'foo', state: 'in progress', type: SCThingType.Dish, @@ -97,7 +98,7 @@ describe('Bulk', function () { messageBody: 'Lorem ipsum.', name: 'foobar', origin: { - indexed: moment().format(), + indexed: new Date().toISOString(), name: 'bar', type: SCThingOriginType.Remote, }, @@ -111,7 +112,7 @@ describe('Bulk', function () { it('should construct', function () { expect(() => { return new Bulk(SCThingType.Dish, client, { - expiration: moment().add(3600, 'seconds').format(), + expiration: addHours(new Date(), 1).toISOString(), source: 'foo', state: 'in progress', type: SCThingType.Dish, @@ -128,7 +129,7 @@ describe('Bulk', function () { expect(client.invokeRoute).not.to.have.been.called(); const bulk = new Bulk(SCThingType.Dish, client, { - expiration: moment().add(3600, 'seconds').format(), + expiration: addHours(new Date(), 1).toISOString(), source: 'foo', state: 'in progress', type: SCThingType.Dish, diff --git a/packages/api/test/connector-client.spec.ts b/packages/api/test/connector-client.spec.ts index 9c79a805..a9e8c836 100644 --- a/packages/api/test/connector-client.spec.ts +++ b/packages/api/test/connector-client.spec.ts @@ -32,8 +32,6 @@ import chai from 'chai'; import {expect} from 'chai'; import chaiAsPromised from 'chai-as-promised'; import chaiSpies from 'chai-spies'; -import clone = require('rfdc'); -import moment from 'moment'; import traverse from 'traverse'; import { ConnectorClient, @@ -82,10 +80,12 @@ describe('ConnectorClient', function () { }); it('should bulk', async function () { - sandbox.on(httpClient, 'request', async (): Promise> => { + let expiration = 'ERROR'; + sandbox.on(httpClient, 'request', async (response): Promise> => { + expiration = response?.body?.expiration ?? 'ERROR'; return { body: { - expiration: moment().add(1800, 'seconds').format(), + expiration, source: 'foo', state: 'in progress', type: SCThingType.Message, @@ -103,7 +103,7 @@ describe('ConnectorClient', function () { expect(httpClient.request).to.have.been.first.called.with({ body: { - expiration: moment().add(1800, 'seconds').format(), + expiration, source: 'foo', type: SCThingType.Message, }, @@ -116,10 +116,12 @@ describe('ConnectorClient', function () { }); it('should bulk without timeout', async function () { - sandbox.on(httpClient, 'request', async (): Promise> => { + let expiration = 'ERROR'; + sandbox.on(httpClient, 'request', async (request): Promise> => { + expiration = request?.body?.expiration ?? 'ERROR'; return { body: { - expiration: moment().add(3600, 'seconds').format(), + expiration, source: 'foo', state: 'in progress', type: SCThingType.Message, @@ -137,7 +139,7 @@ describe('ConnectorClient', function () { expect(httpClient.request).to.have.been.first.called.with({ body: { - expiration: moment().add(3600, 'seconds').format(), + expiration, source: 'foo', type: SCThingType.Message, }, @@ -181,14 +183,17 @@ describe('ConnectorClient', function () { type responses = SCBulkResponse | SCBulkAddResponse | SCBulkDoneResponse; + let expiration = 'ERROR'; sandbox.on( httpClient, 'request', async (request: HttpClientRequest): Promise> => { if (request.url.toString() === new URL('http://localhost' + bulkRoute.getUrlPath()).toString()) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + expiration = (request?.body as any)?.expiration ?? 'ERROR'; return { body: { - expiration: moment().add(3600, 'seconds').format(), + expiration, source: 'copy', state: 'in progress', type: SCThingType.Message, @@ -226,7 +231,7 @@ describe('ConnectorClient', function () { expect(httpClient.request).to.have.been.first.called.with({ body: { - expiration: moment().add(3600, 'seconds').format(), + expiration, source: 'copy', type: SCThingType.Message, }, @@ -275,14 +280,17 @@ describe('ConnectorClient', function () { type responses = SCBulkResponse | SCBulkAddResponse | SCBulkDoneResponse; + let expiration = 'ERROR'; sandbox.on( httpClient, 'request', async (request: HttpClientRequest): Promise> => { if (request.url.toString() === new URL('http://localhost' + bulkRoute.getUrlPath()).toString()) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + expiration = (request?.body as any)?.expiration ?? 'ERROR'; return { body: { - expiration: moment().add(3600, 'seconds').format(), + expiration, source: 'stapps-api', state: 'in progress', type: SCThingType.Message, @@ -320,7 +328,7 @@ describe('ConnectorClient', function () { expect(httpClient.request).to.have.been.first.called.with({ body: { - expiration: moment().add(3600, 'seconds').format(), + expiration, source: 'stapps-api', type: SCThingType.Message, }, @@ -370,7 +378,7 @@ describe('ConnectorClient', function () { ); for (const testInstance of testInstances) { - const checkInstance = clone()(testInstance); + const checkInstance = JSON.parse(JSON.stringify(testInstance)); const testInstanceWithoutReferences = ConnectorClient.removeReferences(testInstance); expect(doesContainThings(testInstanceWithoutReferences)).to.be.equal( diff --git a/packages/api/test/http-client.spec.ts b/packages/api/test/http-client.spec.ts index 00afe80e..2a7c4a60 100644 --- a/packages/api/test/http-client.spec.ts +++ b/packages/api/test/http-client.spec.ts @@ -13,14 +13,18 @@ * this program. If not, see . */ import {expect} from 'chai'; -import nock from 'nock'; +import {Interceptable, MockAgent, setGlobalDispatcher} from 'undici'; import {HttpClient} from '../src/index.js'; -// TODO: use after each to clean up the nock (then there is no need for numerated resource links) +const mockAgent = new MockAgent(); +setGlobalDispatcher(mockAgent); describe('HttpClient', function () { - afterEach(function () { - nock.cleanAll(); + let mockPool: Interceptable; + + beforeEach(function () { + mockPool?.close(); + mockPool = mockAgent.get('http://www.example.com'); }); it('should construct', function () { @@ -32,32 +36,32 @@ describe('HttpClient', function () { it('should request', async function () { const client = new HttpClient(); - nock('http://www.example.com').get('/resource').reply(200, 'foo'); + mockPool.intercept({path: '/resource', method: 'GET'}).reply(200, {foo: 'bar'}); const response = await client.request({ url: new URL('http://www.example.com/resource'), }); - expect(response.body).to.be.equal('foo'); + expect(response.body).to.be.deep.equal({foo: 'bar'}); }); it('should request with body', async function () { const client = new HttpClient(); - nock('http://www.example.com').get('/resource').reply(200, 'foo'); + mockPool.intercept({path: '/resource', method: 'GET'}).reply(200, {foo: 'foo'}); const response = await client.request({ url: new URL('http://www.example.com/resource'), }); - expect(response.body).to.be.equal('foo'); + expect(response.body).to.be.deep.equal({foo: 'foo'}); }); it('should request with error', async function () { const client = new HttpClient(); let caughtError; - nock('http://www.example.com').get('/resource').replyWithError('foo'); + mockPool.intercept({path: '/resource', method: 'GET'}).replyWithError(new Error('foo')); try { await client.request({ @@ -76,7 +80,15 @@ describe('HttpClient', function () { it('should request with headers', async function () { const client = new HttpClient(); - nock('http://www.example.com').get('/resource').reply(200, 'foo'); + mockPool + .intercept({ + path: '/resource', + method: 'GET', + headers: { + 'X-StApps-Version': 'foo.bar.foobar', + }, + }) + .reply(200, {foo: 'bar'}); const response = await client.request({ headers: { @@ -85,32 +97,55 @@ describe('HttpClient', function () { url: new URL('http://www.example.com/resource'), }); - expect(response.body).to.be.equal('foo'); + expect(response.body).to.be.deep.equal({foo: 'bar'}); + }); + + it('should request with body', async function () { + const client = new HttpClient(); + + mockPool + .intercept({ + path: '/resource', + method: 'POST', + headers: { + 'content-type': 'application/json', + }, + body: JSON.stringify({bar: 'baz'}), + }) + .reply(200, {foo: 'foo'}); + + const response = await client.request({ + body: {bar: 'baz'}, + method: 'POST', + url: new URL('http://www.example.com/resource'), + }); + + expect(response.body).to.be.deep.equal({foo: 'foo'}); }); it('should request with method GET', async function () { const client = new HttpClient(); - nock('http://www.example.com').get('/resource').reply(200, 'foo'); + mockPool.intercept({path: '/resource', method: 'GET'}).reply(200, {foo: 'foo'}); const response = await client.request({ method: 'GET', url: new URL('http://www.example.com/resource'), }); - expect(response.body).to.be.equal('foo'); + expect(response.body).to.be.deep.equal({foo: 'foo'}); }); it('should request with method POST', async function () { const client = new HttpClient(); - nock('http://www.example.com').post('/resource').reply(200, 'foo'); + mockPool.intercept({path: '/resource', method: 'POST'}).reply(200, {foo: 'foo'}); const response = await client.request({ method: 'POST', url: new URL('http://www.example.com/resource'), }); - expect(response.body).to.be.equal('foo'); + expect(response.body).to.be.deep.equal({foo: 'foo'}); }); }); diff --git a/packages/collection-utils/package.json b/packages/collection-utils/package.json index 2fa39fd7..43ffeabf 100644 --- a/packages/collection-utils/package.json +++ b/packages/collection-utils/package.json @@ -26,7 +26,7 @@ "ts-node": "10.9.1", "tsup": "6.7.0", "typedoc": "0.24.7", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "tsup": { "entry": [ diff --git a/packages/collection-utils/src/chunk.ts b/packages/collection-utils/src/chunk.ts index 99f824fe..4d5422c5 100644 --- a/packages/collection-utils/src/chunk.ts +++ b/packages/collection-utils/src/chunk.ts @@ -15,7 +15,6 @@ /** * Chunk array into smaller arrays of a specified size. - * * @param array The array to chunk. * @param chunkSize The size of each chunk. */ diff --git a/packages/core-tools/package.json b/packages/core-tools/package.json index 11e4c332..cce962bb 100644 --- a/packages/core-tools/package.json +++ b/packages/core-tools/package.json @@ -78,7 +78,7 @@ "ts-node": "10.9.1", "tsup": "6.7.0", "typedoc": "0.24.7", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "tsup": { "entry": [ diff --git a/packages/core-tools/src/app.ts b/packages/core-tools/src/app.ts index b64bddb3..526da6a3 100644 --- a/packages/core-tools/src/app.ts +++ b/packages/core-tools/src/app.ts @@ -65,7 +65,7 @@ commander // change url path parameters to openapi notation for (const routeWithMetaInformation of routes) { - routeWithMetaInformation.route.urlPath = routeWithMetaInformation.route.urlPath.replace( + routeWithMetaInformation.route.urlPath = routeWithMetaInformation.route.urlPath.replaceAll( /:\w+/g, (match: string) => `{${match.replace(':', '')}}`, ); diff --git a/packages/core-tools/src/common.ts b/packages/core-tools/src/common.ts index 3ea2fa0c..2df5f609 100644 --- a/packages/core-tools/src/common.ts +++ b/packages/core-tools/src/common.ts @@ -18,7 +18,6 @@ import {existsSync} from 'fs'; /** * Get path that contains a tsconfig.json - * * @param startPath Path from where to start searching "upwards" */ export function getTsconfigPath(startPath: string): string { diff --git a/packages/core-tools/src/routes.ts b/packages/core-tools/src/routes.ts index d1a6922a..8c622451 100644 --- a/packages/core-tools/src/routes.ts +++ b/packages/core-tools/src/routes.ts @@ -77,7 +77,6 @@ export async function gatherRouteInformation(path: string): Promise { @@ -87,7 +85,6 @@ export class Validator { /** * Validates anything against a given schema name or infers schema name from object - * * @param instance Instance to validate * @param schema Name of schema to validate instance against or the schema itself */ @@ -125,7 +122,6 @@ export class Validator { * Creates a ValidationResult from ajv * * Implemented for compatibility purposes - * * @param result the result, now a ValidationResult * @param schema the schema that has been validated against * @param instance the data that has been validated @@ -166,7 +162,6 @@ function fromAjvResult( /** * Validate all test files in the given resources directory against schema files in the given (schema) directory - * * @param schemaDirectory The directory where the JSON schema files are * @param resourcesDirectory The directory where the test files are */ @@ -261,7 +256,6 @@ export async function validateFiles( /** * Write a report for errors that occurred in validation - * * @param reportPath Path to write report to * @param errors Errors that occurred in validation */ diff --git a/packages/core/package.json b/packages/core/package.json index 64e92305..7770b4ad 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -58,8 +58,6 @@ "@types/json-schema": "7.0.11", "@types/mocha": "10.0.1", "@types/node": "18.15.3", - "@typescript-eslint/eslint-plugin": "5.49.0", - "@typescript-eslint/parser": "5.49.0", "c8": "7.14.0", "chai": "4.3.7", "conditional-type-checks": "1.0.6", @@ -69,7 +67,7 @@ "ts-node": "10.9.1", "tsup": "6.7.0", "typedoc": "0.24.7", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "tsup": { "entry": [ diff --git a/packages/core/src/config/authorization.ts b/packages/core/src/config/authorization.ts index c9211d08..62792e70 100644 --- a/packages/core/src/config/authorization.ts +++ b/packages/core/src/config/authorization.ts @@ -17,7 +17,6 @@ import {SCUserConfigurationMap} from './user.js'; /** * Supported authorization provider types - * * @see https://datatracker.ietf.org/doc/html/rfc6749#section-1.3.1 * @see https://github.com/gbv/paia */ @@ -74,7 +73,6 @@ export interface SCAuthorizationProviderEndpoints { /** * Mapping of how to create SCUser from userinfo endpoint response (using JSONPath syntax) - * * @see https://www.npmjs.com/package/jsonpath */ mapping: SCUserConfigurationMap; diff --git a/packages/core/src/config/file.ts b/packages/core/src/config/file.ts index 8e690a7c..c2e48554 100644 --- a/packages/core/src/config/file.ts +++ b/packages/core/src/config/file.ts @@ -19,7 +19,6 @@ import {SCBackendConfiguration, SCBackendInternalConfiguration} from './backend. /** * A configuration file that configures app and backend - * * @validatable */ export interface SCConfigFile { diff --git a/packages/core/src/general/i18n.ts b/packages/core/src/general/i18n.ts index dc784029..5cd25889 100644 --- a/packages/core/src/general/i18n.ts +++ b/packages/core/src/general/i18n.ts @@ -18,14 +18,12 @@ export interface SCLanguage { /** * The two letter ISO 639-1 Code of the Language - * * @filterable */ code: SCLanguageCode; /** * The Fulltext name of the Language - * * @filterable */ name: SCLanguageName; @@ -33,7 +31,6 @@ export interface SCLanguage { /** * A list of possible languages in english - * * @see https://en.wikipedia.org/wiki/ISO_639-1 */ export type SCLanguageName = @@ -225,7 +222,6 @@ export type SCLanguageName = /** * A List of all possible Languages as ISO 639-1 Codes - * * @see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes */ export type SCLanguageCode = @@ -417,7 +413,6 @@ export type SCLanguageCode = /** * A list of possible nationalities - * * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */ export type SCNationality = @@ -673,7 +668,6 @@ export type SCNationality = /** * Translations for specific languages - * * @see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes */ export interface SCTranslations { diff --git a/packages/core/src/general/map.ts b/packages/core/src/general/map.ts index c9634686..abccc956 100644 --- a/packages/core/src/general/map.ts +++ b/packages/core/src/general/map.ts @@ -18,7 +18,6 @@ * * !!! BEWARE !!! * Can't be refactored to a `Map`, because it can't be serialized via JSON.stringify(map) - * * @typeparam T Can be any type. */ export interface SCMap { @@ -34,7 +33,6 @@ export interface SCMap { * !!! BEWARE !!! * Can't be refactored to a `Map`, because it can't be serialized via JSON.stringify(map) * Also note, that this is a type not an interface - * * @typeparam U Must be a type the `in` operator can be applied to and contains only strings or numbers * @typeparam T Can be any type */ diff --git a/packages/core/src/general/time.ts b/packages/core/src/general/time.ts index 4fadd6a5..ca54a5f3 100644 --- a/packages/core/src/general/time.ts +++ b/packages/core/src/general/time.ts @@ -14,7 +14,6 @@ */ /** * An ISO8601 date - * * @pattern ^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])(T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])([\.,][0-9]{0,7})?(Z|[+-](?:2[0-3]|[01][0-9])(:?[0-5][0-9])?)?)?$ * @see https://gist.github.com/philipashlock/8830168 * @date @@ -23,7 +22,6 @@ export type SCISO8601Date = string; /** * An ISO8601 duration - * * @pattern ^(R\d*\/)?P(?:\d+(?:\.\d+)?Y)?(?:\d+(?:\.\d+)?M)?(?:\d+(?:\.\d+)?W)?(?:\d+(?:\.\d+)?D)?(?:T(?:\d+(?:\.\d+)?H)?(?:\d+(?:\.\d+)?M)?(?:\d+(?:\.\d+)?S)?)?$ * @see https://gist.github.com/philipashlock/8830168 */ @@ -31,7 +29,6 @@ export type SCISO8601Duration = string; /** * An ISO8601 time - * * @pattern ^(2[0-3]|[01][0-9]):?([0-5][0-9]):?([0-5][0-9])$ */ export type SCISO8601Time = string; diff --git a/packages/core/src/general/uuid.ts b/packages/core/src/general/uuid.ts index 5b5bbcc1..6dc45932 100644 --- a/packages/core/src/general/uuid.ts +++ b/packages/core/src/general/uuid.ts @@ -14,7 +14,6 @@ */ /** * Universally unique identifier of the thing - * * @filterable * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ * @see http://stackoverflow.com/questions/7905929/how-to-test-valid-uuid-guid diff --git a/packages/core/src/guards.ts b/packages/core/src/guards.ts index 617960c0..91d333a8 100644 --- a/packages/core/src/guards.ts +++ b/packages/core/src/guards.ts @@ -25,7 +25,6 @@ import { /** * Type guard to check if something is a SCThing - * * @param something Something to check */ export function isThing(something: unknown): something is SCThing { @@ -48,7 +47,6 @@ export function isThing(something: unknown): something is SCThing { /** * Type guard to check if translations exist - * * @param thing Thing to check */ export function isThingWithTranslations( @@ -59,7 +57,6 @@ export function isThingWithTranslations( /** * Type guard to check if something is a bulk response - * * @param something Something to check */ export function isBulkResponse(something: unknown): something is SCBulkResponse { @@ -96,7 +93,6 @@ export function isBulkResponse(something: unknown): something is SCBulkResponse /** * Type guard to check if something is a search response - * * @param something Something to check */ export function isSearchResponse(something: unknown): something is SCSearchResponse { @@ -119,7 +115,6 @@ export function isSearchResponse(something: unknown): something is SCSearchRespo /** * Type guard to check if something is a multi search response - * * @param something Something to check */ export function isMultiSearchResponse(something: unknown): something is SCMultiSearchResponse { diff --git a/packages/core/src/protocol/error.ts b/packages/core/src/protocol/error.ts index cfee8b95..681287a3 100644 --- a/packages/core/src/protocol/error.ts +++ b/packages/core/src/protocol/error.ts @@ -15,7 +15,6 @@ /** * A generic error that can be returned by the backend if somethings fails during the processing of a request - * * @validatable */ export interface SCErrorResponse extends Error { @@ -41,7 +40,6 @@ export abstract class SCError implements SCErrorResponse { /** * Instatiate an SCError - * * @param name Name of the error * @param message Message of the error * @param statusCode HTTP status code to return this error with diff --git a/packages/core/src/protocol/errors/internal-server-error.ts b/packages/core/src/protocol/errors/internal-server-error.ts index 3472d48a..a46e4971 100644 --- a/packages/core/src/protocol/errors/internal-server-error.ts +++ b/packages/core/src/protocol/errors/internal-server-error.ts @@ -17,7 +17,6 @@ import {SCError} from '../error.js'; /** * An error that is returned, when an internal server error occurred - * * @validatable */ export class SCInternalServerErrorResponse extends SCError { @@ -28,7 +27,6 @@ export class SCInternalServerErrorResponse extends SCError { /** * Create a SCInternalServerErrorResponse - * * @param error Internal server error * @param stack Set to true if a stack trace should be created * and the internal server error should be displayed to the client diff --git a/packages/core/src/protocol/errors/method-not-allowed.ts b/packages/core/src/protocol/errors/method-not-allowed.ts index 05e4858a..3785bcca 100644 --- a/packages/core/src/protocol/errors/method-not-allowed.ts +++ b/packages/core/src/protocol/errors/method-not-allowed.ts @@ -17,13 +17,11 @@ import {SCError} from '../error.js'; /** * An error that is returned, when the used HTTP method is not allowed on the requested route - * * @validatable */ export class SCMethodNotAllowedErrorResponse extends SCError { /** * Create a SCMethodNotAllowedErrorResponse - * * @param stack Set to true if a stack trace should be created */ constructor(stack?: boolean) { diff --git a/packages/core/src/protocol/errors/not-found.ts b/packages/core/src/protocol/errors/not-found.ts index 4d7d98c9..f29d43ad 100644 --- a/packages/core/src/protocol/errors/not-found.ts +++ b/packages/core/src/protocol/errors/not-found.ts @@ -17,13 +17,11 @@ import {SCError} from '../error.js'; /** * An error that is returned when the requested route or resource was not found - * * @validatable */ export class SCNotFoundErrorResponse extends SCError { /** * Create a SCNotFoundErrorResponse - * * @param stack Set to true if a stack trace should be created */ constructor(stack?: boolean) { diff --git a/packages/core/src/protocol/errors/parameters-not-acceptable.ts b/packages/core/src/protocol/errors/parameters-not-acceptable.ts index 1b451961..09c9823e 100644 --- a/packages/core/src/protocol/errors/parameters-not-acceptable.ts +++ b/packages/core/src/protocol/errors/parameters-not-acceptable.ts @@ -18,13 +18,11 @@ import {SCError} from '../error.js'; /** * An error that is returned when the request is in the right format, but contains parameters that are invalid or not * acceptable. - * * @validatable */ export class SCParametersNotAcceptable extends SCError { /** * Create a ParametersNotAcceptable - * * @param message contains more details to what you did wrong * @param stack Set to true if a stack trace should be created */ diff --git a/packages/core/src/protocol/errors/plugin-already-registered.ts b/packages/core/src/protocol/errors/plugin-already-registered.ts index 4b1bc809..1aa018f5 100644 --- a/packages/core/src/protocol/errors/plugin-already-registered.ts +++ b/packages/core/src/protocol/errors/plugin-already-registered.ts @@ -20,7 +20,6 @@ import {SCPluginMetaData} from '../routes/plugin-register.js'; * An error that is returned when a plugin with the same name is already registered, to prevent two copies of a plugin * running at the same time. * This usually indicates that there is more than one instance a plugin running. - * * @validatable */ export class SCPluginAlreadyRegisteredErrorResponse extends SCError { @@ -32,7 +31,6 @@ export class SCPluginAlreadyRegisteredErrorResponse extends SCError { /** * Create a SCPluginAlreadyRegisteredError - * * @param message Provide further information why an already registered plugin matches the one we want to register * @param plugin Provides meta data of a registered plugin, which is in a conflict with the plugin we want to register * @param stack Set to true if a stack trace should be created diff --git a/packages/core/src/protocol/errors/plugin-registering-failed.ts b/packages/core/src/protocol/errors/plugin-registering-failed.ts index 75360a72..adfb8069 100644 --- a/packages/core/src/protocol/errors/plugin-registering-failed.ts +++ b/packages/core/src/protocol/errors/plugin-registering-failed.ts @@ -17,13 +17,11 @@ import {SCError} from '../error.js'; /** * An error that is returned whenever there is an unexpected error while creating a plugin - * * @validatable */ export class SCPluginRegisteringFailedErrorResponse extends SCError { /** * Create a PluginRegisteringFailedError - * * @param message Describes what went wrong wile registering the plugin * @param stack Set to true if a stack trace should be created */ diff --git a/packages/core/src/protocol/errors/request-body-too-large.ts b/packages/core/src/protocol/errors/request-body-too-large.ts index bd600d5a..ae5bac3d 100644 --- a/packages/core/src/protocol/errors/request-body-too-large.ts +++ b/packages/core/src/protocol/errors/request-body-too-large.ts @@ -17,13 +17,11 @@ import {SCError} from '../error.js'; /** * An error that is returned, when the request body is too large. - * * @validatable */ export class SCRequestBodyTooLargeErrorResponse extends SCError { /** * Create a SCRequestBodyTooLargeErrorResponse - * * @param stack Set to true if a stack trace should be created */ constructor(stack?: boolean) { diff --git a/packages/core/src/protocol/errors/syntax-error.ts b/packages/core/src/protocol/errors/syntax-error.ts index b74036e1..f7960699 100644 --- a/packages/core/src/protocol/errors/syntax-error.ts +++ b/packages/core/src/protocol/errors/syntax-error.ts @@ -17,13 +17,11 @@ import {SCError} from '../error.js'; /** * An error that is returned whenever there is a syntax error - * * @validatable */ export class SCSyntaxErrorResponse extends SCError { /** * Create a SyntaxError - * * @param message Describes the syntax error * @param stack Set to true if a stack trace should be created */ diff --git a/packages/core/src/protocol/errors/too-many-requests.ts b/packages/core/src/protocol/errors/too-many-requests.ts index a9438c6d..6a8b67b5 100644 --- a/packages/core/src/protocol/errors/too-many-requests.ts +++ b/packages/core/src/protocol/errors/too-many-requests.ts @@ -17,13 +17,11 @@ import {SCError} from '../error.js'; /** * An error that is returned, when to many request are submitted at once - * * @validatable */ export class SCTooManyRequestsErrorResponse extends SCError { /** * Create a SCTooManyRequestsErrorResponse - * * @param stack Set to true if a stack trace should be created */ constructor(stack?: boolean) { diff --git a/packages/core/src/protocol/errors/unsupported-media-type.ts b/packages/core/src/protocol/errors/unsupported-media-type.ts index 257c7271..92fc5e65 100644 --- a/packages/core/src/protocol/errors/unsupported-media-type.ts +++ b/packages/core/src/protocol/errors/unsupported-media-type.ts @@ -17,13 +17,11 @@ import {SCError} from '../error.js'; /** * An error that is returned when the content type of the request is not supported - * * @validatable */ export class SCUnsupportedMediaTypeErrorResponse extends SCError { /** * Create a SCUnsupportedMediaTypeErrorResponse - * * @param stack Set to true if a stack trace should be created */ constructor(stack?: boolean) { diff --git a/packages/core/src/protocol/errors/validation.ts b/packages/core/src/protocol/errors/validation.ts index 7afbc24a..63e7246b 100644 --- a/packages/core/src/protocol/errors/validation.ts +++ b/packages/core/src/protocol/errors/validation.ts @@ -18,7 +18,6 @@ import {SCError} from '../error.js'; /** * An error that is returned when the validation of a request fails - * * @validatable */ export class SCValidationErrorResponse extends SCError { @@ -29,7 +28,6 @@ export class SCValidationErrorResponse extends SCError { /** * Create a SCValidationErrorResponse - * * @param errors List of validation errors * @param stack Set to true if a stack trace should be created */ diff --git a/packages/core/src/protocol/route.ts b/packages/core/src/protocol/route.ts index 2e0a59ab..16d43a83 100644 --- a/packages/core/src/protocol/route.ts +++ b/packages/core/src/protocol/route.ts @@ -125,7 +125,6 @@ export abstract class SCAbstractRoute implements SCRoute { /** * Get "compiled" URL path - * * @param parameters Parameters to compile URL path with */ public getUrlPath(parameters: SCMap = {}): string { diff --git a/packages/core/src/protocol/routes/book-availability.ts b/packages/core/src/protocol/routes/book-availability.ts index 755c5fc3..063ee047 100644 --- a/packages/core/src/protocol/routes/book-availability.ts +++ b/packages/core/src/protocol/routes/book-availability.ts @@ -29,7 +29,6 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js'; /** * Request to check the availability of books - * * @validatable */ export type SCBookAvailabilityRequest = SCBookAvailabilityRequestByIsbn | SCBookAvailabilityRequestByUuid; @@ -56,7 +55,6 @@ export interface SCBookAvailabilityRequestByUuid { /** * List of availabilities of a book - * * @validatable */ export type SCBookAvailabilityResponse = Array>; diff --git a/packages/core/src/protocol/routes/bulk-add.ts b/packages/core/src/protocol/routes/bulk-add.ts index 1a691f66..079a75f1 100644 --- a/packages/core/src/protocol/routes/bulk-add.ts +++ b/packages/core/src/protocol/routes/bulk-add.ts @@ -25,14 +25,12 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js'; /** * Request to add a thing to a bulk - * * @validatable */ export type SCBulkAddRequest = SCThings; /** * Response to a request to add a thing to a bulk - * * @validatable */ export interface SCBulkAddResponse {} diff --git a/packages/core/src/protocol/routes/bulk-done.ts b/packages/core/src/protocol/routes/bulk-done.ts index 9b10e465..61abd02b 100644 --- a/packages/core/src/protocol/routes/bulk-done.ts +++ b/packages/core/src/protocol/routes/bulk-done.ts @@ -24,14 +24,12 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js'; /** * Request to change the bulk state to done (close the bulk process) - * * @validatable */ export interface SCBulkDoneRequest {} /** * Response to a request to change the state of a bulk to done - * * @validatable */ export interface SCBulkDoneResponse {} diff --git a/packages/core/src/protocol/routes/bulk-request.ts b/packages/core/src/protocol/routes/bulk-request.ts index b9bf0681..cb4631fa 100644 --- a/packages/core/src/protocol/routes/bulk-request.ts +++ b/packages/core/src/protocol/routes/bulk-request.ts @@ -28,7 +28,6 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js'; * A bulk request * * Parameters to be sent to request a new bulk. - * * @validatable */ export type SCBulkRequest = SCBulkParameters; @@ -62,7 +61,6 @@ export interface SCBulkParameters { /** * Requested Bulk from backend - * * @validatable */ export interface SCBulkResponse extends SCBulkParameters { diff --git a/packages/core/src/protocol/routes/feedback.ts b/packages/core/src/protocol/routes/feedback.ts index fad839b4..301af952 100644 --- a/packages/core/src/protocol/routes/feedback.ts +++ b/packages/core/src/protocol/routes/feedback.ts @@ -24,7 +24,6 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js'; /** * User feedback - * * @validatable */ export interface SCFeedbackRequest extends SCMessage { @@ -36,7 +35,6 @@ export interface SCFeedbackRequest extends SCMessage { /** * A response to a feedback request - * * @validatable */ export interface SCFeedbackResponse {} diff --git a/packages/core/src/protocol/routes/index.ts b/packages/core/src/protocol/routes/index.ts index 34f16eee..09c46062 100644 --- a/packages/core/src/protocol/routes/index.ts +++ b/packages/core/src/protocol/routes/index.ts @@ -26,14 +26,12 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js'; /** * Index request - * * @validatable */ export interface SCIndexRequest {} /** * A response to an index request - * * @validatable */ export interface SCIndexResponse { diff --git a/packages/core/src/protocol/routes/plugin-register.ts b/packages/core/src/protocol/routes/plugin-register.ts index 5d46822c..a6938e71 100644 --- a/packages/core/src/protocol/routes/plugin-register.ts +++ b/packages/core/src/protocol/routes/plugin-register.ts @@ -26,7 +26,6 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js'; /** * Plugin register request - * * @validatable */ export type SCPluginRegisterRequest = SCPluginAdd | SCPluginRemove; @@ -93,7 +92,6 @@ export interface SCPluginMetaData { /** * Plugin register response - * * @validatable */ export interface SCPluginRegisterResponse { diff --git a/packages/core/src/protocol/routes/rating.ts b/packages/core/src/protocol/routes/rating.ts index b51d493e..ce399089 100644 --- a/packages/core/src/protocol/routes/rating.ts +++ b/packages/core/src/protocol/routes/rating.ts @@ -27,7 +27,6 @@ import {SCValidationErrorResponse} from '../errors/validation.js'; * User rating from the app * Plugin needs to define its own rating request to hit the target rating system. * That request should extend this one and contain timestamp and other needed data. - * * @validatable */ export interface SCRatingRequest { @@ -49,7 +48,6 @@ export interface SCRatingRequest { /** * A response to a rating request - * * @validatable */ export interface SCRatingResponse {} diff --git a/packages/core/src/protocol/routes/search-multi.ts b/packages/core/src/protocol/routes/search-multi.ts index edaf20d5..1afe5f95 100644 --- a/packages/core/src/protocol/routes/search-multi.ts +++ b/packages/core/src/protocol/routes/search-multi.ts @@ -31,7 +31,6 @@ import {SCSearchResult} from '../search/result.js'; * This is a map of [[SCSearchRequest]]s indexed by name. * * **CAUTION: This is limited to an amount of queries. Currently this limit is 5.** - * * @validatable */ export type SCMultiSearchRequest = SCMap; @@ -40,7 +39,6 @@ export type SCMultiSearchRequest = SCMap; * A multi search response * * This is a map of [[SCSearchResponse]]s indexed by name - * * @validatable */ export type SCMultiSearchResponse = SCMap; diff --git a/packages/core/src/protocol/routes/search.ts b/packages/core/src/protocol/routes/search.ts index 3892746b..2c19db23 100644 --- a/packages/core/src/protocol/routes/search.ts +++ b/packages/core/src/protocol/routes/search.ts @@ -25,14 +25,12 @@ import {SCSearchResult} from '../search/result.js'; /** * A search request - * * @validatable */ export type SCSearchRequest = SCSearchQuery; /** * A search response - * * @validatable */ export type SCSearchResponse = SCSearchResult; diff --git a/packages/core/src/protocol/routes/thing-update.ts b/packages/core/src/protocol/routes/thing-update.ts index fb71d06b..aca5577a 100644 --- a/packages/core/src/protocol/routes/thing-update.ts +++ b/packages/core/src/protocol/routes/thing-update.ts @@ -25,14 +25,12 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js'; /** * Request to update an existing thing - * * @validatable */ export type SCThingUpdateRequest = SCThings; /** * Response for an entity update request - * * @validatable */ export interface SCThingUpdateResponse {} diff --git a/packages/core/src/protocol/search/filters/range.ts b/packages/core/src/protocol/search/filters/range.ts index 65ce68b2..6a34a20a 100644 --- a/packages/core/src/protocol/search/filters/range.ts +++ b/packages/core/src/protocol/search/filters/range.ts @@ -19,7 +19,6 @@ import {SCSearchAbstractFilter, SCSearchAbstractFilterArguments} from '../filter * A date range filter * * Filter for documents with a date field that satisfies the given constraints - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-range-query.html#_date_format_in_range_queries */ export interface SCSearchDateRangeFilter extends SCSearchAbstractFilter { @@ -33,7 +32,6 @@ export interface SCSearchDateRangeFilter extends SCSearchAbstractFilter { @@ -47,20 +45,17 @@ export interface SCSearchNumericRangeFilter extends SCSearchAbstractFilter { /** * Optional date format specifier - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-range-query.html#_date_format_in_range_queries */ format?: string; /** * Optional timezone specifier - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-range-query.html#_time_zone_in_range_queries */ timeZone?: string; @@ -73,7 +68,6 @@ export type SCNumericRangeFilterArguments = SCRangeFilterArguments; /** * Additional arguments for range filters - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-range-query.html#query-dsl-range-query */ export interface SCRangeFilterArguments extends SCSearchAbstractFilterArguments { diff --git a/packages/core/src/things/abstract/academic-degree.ts b/packages/core/src/things/abstract/academic-degree.ts index 3a6919c4..7e0b2272 100644 --- a/packages/core/src/things/abstract/academic-degree.ts +++ b/packages/core/src/things/abstract/academic-degree.ts @@ -21,7 +21,6 @@ import {SCThing, SCThingMeta, SCThingWithoutReferences} from './thing.js'; export interface SCAcademicDegreeWithoutReferences extends SCThingWithoutReferences { /** * The achievable academic degree - * * @filterable * @sortable ducet */ diff --git a/packages/core/src/things/abstract/academic-term.ts b/packages/core/src/things/abstract/academic-term.ts index f0d98ba6..17452619 100644 --- a/packages/core/src/things/abstract/academic-term.ts +++ b/packages/core/src/things/abstract/academic-term.ts @@ -22,7 +22,6 @@ import {SCThing, SCThingMeta, SCThingWithoutReferences} from './thing.js'; export interface SCAcademicTermWithoutReferences extends SCThingWithoutReferences { /** * Short name of the academic term, using the given pattern - * * @aggregatable * @filterable * @keyword @@ -31,28 +30,24 @@ export interface SCAcademicTermWithoutReferences extends SCThingWithoutReference /** * End date of the academic term - * * @filterable */ endDate: SCISO8601Date; /** * End date of lectures in the academic term - * * @filterable */ eventsEndDate?: SCISO8601Date; /** * Start date of lectures in the academic term - * * @filterable */ eventsStartDate?: SCISO8601Date; /** * Start date of the academic term - * * @filterable */ startDate: SCISO8601Date; diff --git a/packages/core/src/things/abstract/creative-work.ts b/packages/core/src/things/abstract/creative-work.ts index f4267d9e..4c9cd65f 100644 --- a/packages/core/src/things/abstract/creative-work.ts +++ b/packages/core/src/things/abstract/creative-work.ts @@ -35,28 +35,24 @@ export interface SCCreativeWorkWithoutReferences extends SCThingWithoutReference /** * Edition of a creative work (e.g. the book edition or edition of an article) - * * @keyword */ edition?: string; /** * Date (in text form) the creative work was published for the first time - * * @keyword */ firstPublished?: string; /** * Languages this creative work is written/recorded/... in - * * @filterable */ inLanguage?: SCLanguageCode; /** * Keywords of the creative work - * * @aggregatable * @filterable * @keyword @@ -65,7 +61,6 @@ export interface SCCreativeWorkWithoutReferences extends SCThingWithoutReference /** * Date (in text form) the creative work was most recently - * * @keyword */ lastPublished?: string; @@ -117,7 +112,6 @@ export interface SCCreativeWork extends SCCreativeWorkWithoutReferences, SCThing export interface SCCreativeWorkTranslatableProperties extends SCThingTranslatableProperties { /** * Translation of the keywords of the creative work - * * @keyword */ keywords?: string[]; diff --git a/packages/core/src/things/abstract/event.ts b/packages/core/src/things/abstract/event.ts index 3cfeb2ae..ab54ca07 100644 --- a/packages/core/src/things/abstract/event.ts +++ b/packages/core/src/things/abstract/event.ts @@ -27,7 +27,6 @@ export interface SCEventWithoutReferences extends SCThingWithoutReferences { * Maximum number of participants of the event * * A maximum number of people that can participate in the event. - * * @integer */ maximumParticipants?: number; @@ -36,7 +35,6 @@ export interface SCEventWithoutReferences extends SCThingWithoutReferences { * Remaining attendee capacity of the event * * This number represents the remaining open spots. - * * @integer */ remainingAttendeeCapacity?: number; diff --git a/packages/core/src/things/abstract/place.ts b/packages/core/src/things/abstract/place.ts index 4b3f1672..7e7e9cfc 100644 --- a/packages/core/src/things/abstract/place.ts +++ b/packages/core/src/things/abstract/place.ts @@ -39,42 +39,36 @@ export interface SCGeoInformation { export interface SCPostalAddress { /** * Country of the address - * * @filterable */ addressCountry: string; /** * City of the address - * * @filterable */ addressLocality: string; /** * State of the address - * * @filterable */ addressRegion?: string; /** * Zip code of the address - * * @filterable */ postalCode: string; /** * Optional post box number - * * @filterable */ postOfficeBoxNumber?: string; /** * Street of the address - with house number! - * * @filterable */ streetAddress: string; @@ -99,7 +93,6 @@ export interface SCPlaceWithoutReferences extends SCThingWithoutReferences { /** * Opening hours of the place - * * @see http://wiki.openstreetmap.org/wiki/Key:opening_hours/specification * @keyword */ diff --git a/packages/core/src/things/abstract/thing-that-accepts-payments.ts b/packages/core/src/things/abstract/thing-that-accepts-payments.ts index 2bde63a6..918a7b55 100644 --- a/packages/core/src/things/abstract/thing-that-accepts-payments.ts +++ b/packages/core/src/things/abstract/thing-that-accepts-payments.ts @@ -26,7 +26,6 @@ export type SCThingThatAcceptsPaymentsAcceptedPayments = 'cash' | 'credit' | 'ca export interface SCThingThatAcceptsPaymentsWithoutReferences extends SCThingWithoutReferences { /** * Accepted payments of the place - * * @filterable */ paymentsAccepted?: SCThingThatAcceptsPaymentsAcceptedPayments[]; diff --git a/packages/core/src/things/abstract/thing-that-can-be-offered.ts b/packages/core/src/things/abstract/thing-that-can-be-offered.ts index 46837095..3d894fba 100644 --- a/packages/core/src/things/abstract/thing-that-can-be-offered.ts +++ b/packages/core/src/things/abstract/thing-that-can-be-offered.ts @@ -25,7 +25,6 @@ import {SCThing, SCThingMeta, SCThingTranslatableProperties, SCThingWithoutRefer export interface SCPriceGroup { /** * Default price of the thing - * * @sortable price * @float */ @@ -38,7 +37,6 @@ export interface SCPriceGroup { export interface SCAcademicPriceGroup extends SCPriceGroup { /** * Price for employees - * * @sortable price * @float */ @@ -46,7 +44,6 @@ export interface SCAcademicPriceGroup extends SCPriceGroup { /** * Price for guests - * * @sortable price * @float */ @@ -54,7 +51,6 @@ export interface SCAcademicPriceGroup extends SCPriceGroup { /** * Price for students - * * @sortable price * @float */ @@ -119,7 +115,6 @@ export interface SCThingThatCanBeOfferedOffer extends SC export interface SCThingThatCanBeOfferedTranslatableProperties extends SCThingTranslatableProperties { /** * Availability of an offer - * * @keyword */ 'offers[].availability'?: string; diff --git a/packages/core/src/things/abstract/thing-with-categories.ts b/packages/core/src/things/abstract/thing-with-categories.ts index c96916d7..6c900862 100644 --- a/packages/core/src/things/abstract/thing-with-categories.ts +++ b/packages/core/src/things/abstract/thing-with-categories.ts @@ -26,7 +26,6 @@ export interface SCThingWithCategoriesWithoutReferences { /** * Majors of the academic event that this event belongs to - * * @aggregatable * @filterable * @keyword @@ -40,7 +39,6 @@ export interface SCAcademicEventWithoutReferences /** * Original unmapped category from the source of the academic event - * * @filterable * @keyword */ @@ -59,7 +57,6 @@ export interface SCAcademicEventWithoutReferences /** * An academic event - * * @validatable * @indexable */ @@ -104,14 +101,12 @@ export type SCAcademicEventCategories = export interface SCAcademicEventTranslatableProperties extends SCThingWithCategoriesTranslatableProperties { /** * Translations of the majors of the academic event that this event belongs to - * * @keyword */ majors?: string[]; /** * Translation of the original unmapped category from the source of the academic event - * * @keyword */ originalCategory?: string; diff --git a/packages/core/src/things/article.ts b/packages/core/src/things/article.ts index 4520aae2..e016ad97 100644 --- a/packages/core/src/things/article.ts +++ b/packages/core/src/things/article.ts @@ -49,7 +49,6 @@ export interface SCArticleWithoutReferences SCThingWithCategoriesWithoutReferences { /** * Article itself as markdown - * * @text */ articleBody?: string; @@ -72,7 +71,6 @@ export interface SCArticleWithoutReferences /** * An article - * * @validatable * @indexable */ @@ -109,7 +107,6 @@ export interface SCArticleTranslatableProperties SCCreativeWorkTranslatableProperties { /** * Translation of the article itself as markdown - * * @text */ articleBody?: string[]; diff --git a/packages/core/src/things/assessment.ts b/packages/core/src/things/assessment.ts index c025d132..3fbc1128 100644 --- a/packages/core/src/things/assessment.ts +++ b/packages/core/src/things/assessment.ts @@ -41,7 +41,6 @@ export interface SCAssessmentWithoutReferences > { /** * Number of attempts - * * @integer */ attempt?: number; @@ -53,7 +52,6 @@ export interface SCAssessmentWithoutReferences /** * ECTS (credit-points) - * * @float */ ects?: number; @@ -81,7 +79,6 @@ export interface SCAssessmentWithoutReferences /** * An assessment - * * @validatable */ export interface SCAssessment diff --git a/packages/core/src/things/book.ts b/packages/core/src/things/book.ts index a9cfe906..075678e5 100644 --- a/packages/core/src/things/book.ts +++ b/packages/core/src/things/book.ts @@ -73,7 +73,6 @@ export interface SCBookWithoutReferences /** * ISBNs of a book - * * @filterable * @keyword */ @@ -81,7 +80,6 @@ export interface SCBookWithoutReferences /** * Number of pages of a book - * * @integer */ numberOfPages?: number; @@ -99,7 +97,6 @@ export interface SCBookWithoutReferences /** * A book - * * @validatable * @indexable */ diff --git a/packages/core/src/things/building.ts b/packages/core/src/things/building.ts index 3e5720c7..40703cfa 100644 --- a/packages/core/src/things/building.ts +++ b/packages/core/src/things/building.ts @@ -43,7 +43,6 @@ export interface SCBuildingWithoutReferences SCPlaceWithoutReferences { /** * List of floor names of the place - * * @filterable * @keyword */ @@ -62,7 +61,6 @@ export interface SCBuildingWithoutReferences /** * A building - * * @validatable * @indexable */ diff --git a/packages/core/src/things/catalog.ts b/packages/core/src/things/catalog.ts index 0fddb240..0f85657b 100644 --- a/packages/core/src/things/catalog.ts +++ b/packages/core/src/things/catalog.ts @@ -32,7 +32,6 @@ export interface SCCatalogWithoutReferences * Level of the catalog (0 for 'root catalog', 1 for its subcatalog, 2 for its subcatalog etc.) * * Needed for keeping order in catalog inheritance array. - * * @filterable * @integer */ @@ -46,7 +45,6 @@ export interface SCCatalogWithoutReferences /** * A catalog - * * @validatable * @indexable */ diff --git a/packages/core/src/things/contact-point.ts b/packages/core/src/things/contact-point.ts index 263a26af..5a9147ef 100644 --- a/packages/core/src/things/contact-point.ts +++ b/packages/core/src/things/contact-point.ts @@ -23,21 +23,18 @@ import {SCRoomWithoutReferences} from './room.js'; export interface SCContactPointWithoutReferences extends SCThingWithoutReferences { /** * E-mail at the work location - * * @keyword */ email?: string; /** * Fax number at the work location - * * @keyword */ faxNumber?: string; /** * Office hours for contacting someone at the work location - * * @see http://wiki.openstreetmap.org/wiki/Key:opening_hours/specification * @keyword */ @@ -45,7 +42,6 @@ export interface SCContactPointWithoutReferences extends SCThingWithoutReference /** * Contact number at the work location - * * @keyword */ telephone?: string; @@ -57,7 +53,6 @@ export interface SCContactPointWithoutReferences extends SCThingWithoutReference /** * URL at the work location - * * @keyword */ url?: string; @@ -65,7 +60,6 @@ export interface SCContactPointWithoutReferences extends SCThingWithoutReference /** * A contact point - * * @see http://schema.org/ContactPoint * @validatable * @indexable diff --git a/packages/core/src/things/course-of-study.ts b/packages/core/src/things/course-of-study.ts index d1fab2de..2fc9f7fb 100644 --- a/packages/core/src/things/course-of-study.ts +++ b/packages/core/src/things/course-of-study.ts @@ -43,14 +43,12 @@ export interface SCCourseOfStudyWithoutReferences /** * The modes the course of study is offered in - * * @filterable */ mode?: SCCourseOfStudyMode; /** * The time modes the course of study is offered in - * * @filterable */ timeMode?: SCCourseOfStudyTimeMode; @@ -68,7 +66,6 @@ export interface SCCourseOfStudyWithoutReferences /** * A course of study - * * @validatable * @indexable */ diff --git a/packages/core/src/things/date-series.ts b/packages/core/src/things/date-series.ts index 46bb0bda..4f759483 100644 --- a/packages/core/src/things/date-series.ts +++ b/packages/core/src/things/date-series.ts @@ -33,7 +33,6 @@ import {SCSportCourseWithoutReferences} from './sport-course.js'; export interface SCSportCoursePriceGroup extends SCAcademicPriceGroup { /** * Price for alumnis - * * @float */ alumni?: number; @@ -45,7 +44,6 @@ export interface SCSportCoursePriceGroup extends SCAcademicPriceGroup { export interface SCDateSeriesWithoutReferences extends SCThingThatCanBeOfferedWithoutReferences { /** * Dates of the date series that are initially planned to be held - * * @filterable */ dates: SCISO8601Date[]; @@ -62,7 +60,6 @@ export interface SCDateSeriesWithoutReferences extends SCThingThatCanBeOfferedWi /** * Frequency of the date series - * * @filterable */ repeatFrequency?: SCISO8601Duration; @@ -80,7 +77,6 @@ export interface SCDateSeriesWithoutReferences extends SCThingThatCanBeOfferedWi /** * A date series - * * @validatable * @indexable */ diff --git a/packages/core/src/things/diff.ts b/packages/core/src/things/diff.ts index 6b5f9bba..b5311e0d 100644 --- a/packages/core/src/things/diff.ts +++ b/packages/core/src/things/diff.ts @@ -45,7 +45,6 @@ export interface SCDiffWithoutReferences extends SCThingWithoutReferences { /** * A diff - * * @validatable */ export interface SCDiff extends SCDiffWithoutReferences, SCThing { diff --git a/packages/core/src/things/dish.ts b/packages/core/src/things/dish.ts index 8aee71bf..5c75f39c 100644 --- a/packages/core/src/things/dish.ts +++ b/packages/core/src/things/dish.ts @@ -38,7 +38,6 @@ export interface SCDishWithoutReferences SCThingWithCategoriesWithoutReferences { /** * Additives of the dish - * * @filterable * @keyword */ @@ -72,7 +71,6 @@ export interface SCDishWithoutReferences /** * A dish - * * @validatable * @indexable */ @@ -106,7 +104,6 @@ export interface SCDishTranslatableProperties SCThingThatCanBeOfferedTranslatableProperties { /** * Additives of the dish - * * @filterable * @keyword */ @@ -123,14 +120,12 @@ export interface SCDishTranslatableProperties export interface SCDishCharacteristic { /** * URL of an image of the characteristic - * * @keyword */ image?: string; /** * Name of the characteristic - * * @filterable * @text */ @@ -144,55 +139,47 @@ export type SCDishCategories = 'appetizer' | 'salad' | 'main dish' | 'dessert' | /** * Type definition for SCNutritionInformation - * * @see https://schema.org/NutritionInformation */ export interface SCNutritionInformation { /** * Number of calories contained (in kcal) - * * @float */ calories?: number; /** * Content of carbohydrates (in grams) - * * @float */ carbohydrateContent?: number; /** * Content of fat (in grams) - * * @float */ fatContent?: number; /** * Content of proteins (in grams) - * * @float */ proteinContent?: number; /** * Content of salt (in grams) - * * @float */ saltContent?: number; /** * Content of saturated fat (in grams) - * * @float */ saturatedFatContent?: number; /** * Content of sugar (in grams) - * * @float */ sugarContent?: number; @@ -206,7 +193,6 @@ export interface SCMenuSection { /** * The time span when the dishes from the sections are available. - * * @see http://wiki.openstreetmap.org/wiki/Key:opening_hours/specification */ servingHours?: string; diff --git a/packages/core/src/things/favorite.ts b/packages/core/src/things/favorite.ts index 8f456d78..e8a84019 100644 --- a/packages/core/src/things/favorite.ts +++ b/packages/core/src/things/favorite.ts @@ -27,7 +27,6 @@ export interface SCFavoriteWithoutReferences extends SCSaveableThingWithoutRefer /** * A favorite - * * @validatable */ export interface SCFavorite extends SCSaveableThing { diff --git a/packages/core/src/things/floor.ts b/packages/core/src/things/floor.ts index 262c286c..b254ea01 100644 --- a/packages/core/src/things/floor.ts +++ b/packages/core/src/things/floor.ts @@ -30,7 +30,6 @@ import {SCRoomWithoutReferences} from './room.js'; export interface SCFloorWithoutReferences extends SCThingWithoutReferences { /** * Floor name in the place it is in e.g. "first floor", "ground floor". This doesn't reference the building name. - * * @text */ floorName: string; @@ -53,7 +52,6 @@ export interface SCFloorWithoutReferences extends SCThingWithoutReferences { /** * A floor - * * @validatable * @indexable */ @@ -97,7 +95,6 @@ export interface SCFloorFeatureWithPlace export interface SCFloorTranslatableProperties extends SCThingTranslatableProperties { /** * Translation of the floor name - * * @text */ floorName?: string; diff --git a/packages/core/src/things/message.ts b/packages/core/src/things/message.ts index 413d1c85..94066cf2 100644 --- a/packages/core/src/things/message.ts +++ b/packages/core/src/things/message.ts @@ -48,7 +48,6 @@ export interface SCMessageWithoutReferences /** * Roles for which the message is intended - * * @filterable */ audiences: SCUserGroup[]; @@ -60,14 +59,12 @@ export interface SCMessageWithoutReferences /** * When the message was created - * * @filterable */ dateCreated?: SCISO8601Date; /** * Message itself - * * @text */ messageBody: string; @@ -90,7 +87,6 @@ export interface SCMessageWithoutReferences /** * A message - * * @validatable * @indexable */ @@ -114,7 +110,6 @@ export interface SCMessageTranslatableProperties SCThingThatCanBeOfferedTranslatableProperties { /** * Message itself - * * @text */ messageBody?: string; diff --git a/packages/core/src/things/organization.ts b/packages/core/src/things/organization.ts index e79ee31f..f9d90b70 100644 --- a/packages/core/src/things/organization.ts +++ b/packages/core/src/things/organization.ts @@ -29,7 +29,6 @@ export interface SCOrganizationWithoutReferences extends SCThingWithoutReference /** * An organization - * * @validatable * @indexable */ diff --git a/packages/core/src/things/periodical.ts b/packages/core/src/things/periodical.ts index bf7d596e..36bff0af 100644 --- a/packages/core/src/things/periodical.ts +++ b/packages/core/src/things/periodical.ts @@ -52,7 +52,6 @@ export interface SCPeriodicalWithoutReferences categories: SCPeriodicalCategories[]; /** * A list of ISSNs of a periodical - * * @filterable * @keyword */ @@ -71,7 +70,6 @@ export interface SCPeriodicalWithoutReferences /** * A publication published at regular intervals (e.g. a magazine or newspaper) - * * @validatable * @indexable */ diff --git a/packages/core/src/things/person.ts b/packages/core/src/things/person.ts index 9d2b113c..57beece8 100644 --- a/packages/core/src/things/person.ts +++ b/packages/core/src/things/person.ts @@ -27,7 +27,6 @@ import {SCRoomWithoutReferences} from './room.js'; export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * Additional first names of the person. - * * @filterable * @keyword */ @@ -35,14 +34,12 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * The birth date of the person. - * * @filterable */ birthDate?: SCISO8601Date; /** * The private email address of the person. - * * @TJS-format email * @filterable * @keyword @@ -51,7 +48,6 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * The family name of the person. - * * @filterable * @keyword */ @@ -59,7 +55,6 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * The private fax number of the person. - * * @filterable * @keyword */ @@ -67,14 +62,12 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * The gender of the person. - * * @filterable */ gender?: SCPersonGender; /** * The first name of the person. - * * @filterable * @keyword */ @@ -82,7 +75,6 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * Honorific prefix of the person. - * * @filterable * @keyword */ @@ -90,7 +82,6 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * Honorific suffix of the person. - * * @filterable * @keyword */ @@ -98,7 +89,6 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * Titles of jobs that the person has. - * * @filterable * @keyword */ @@ -106,7 +96,6 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * The complete name of the person combining all the parts of the name into one. - * * @filterable * @text */ @@ -119,7 +108,6 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * The private telephone number of the person. - * * @keyword */ telephone?: string; @@ -132,7 +120,6 @@ export interface SCPersonWithoutReferences extends SCThingWithoutReferences { /** * A person - * * @validatable * @indexable */ diff --git a/packages/core/src/things/point-of-interest.ts b/packages/core/src/things/point-of-interest.ts index 4808a6e3..fb9a8789 100644 --- a/packages/core/src/things/point-of-interest.ts +++ b/packages/core/src/things/point-of-interest.ts @@ -46,7 +46,6 @@ export interface SCPointOfInterestWithoutReferences /** * A point of interest - * * @validatable * @indexable */ diff --git a/packages/core/src/things/publication-event.ts b/packages/core/src/things/publication-event.ts index 938adb7a..9d633b63 100644 --- a/packages/core/src/things/publication-event.ts +++ b/packages/core/src/things/publication-event.ts @@ -43,7 +43,6 @@ export interface SCPublicationEventWithoutReferences extends SCEventWithoutRefer /** * An publication event - * * @validatable * @indexable */ diff --git a/packages/core/src/things/room.ts b/packages/core/src/things/room.ts index 845fbaca..afff7294 100644 --- a/packages/core/src/things/room.ts +++ b/packages/core/src/things/room.ts @@ -58,7 +58,6 @@ export interface SCRoomWithoutReferences SCThingWithCategoriesWithoutReferences { /** * The name of the floor in which the room is in. - * * @filterable * @text */ @@ -84,7 +83,6 @@ export interface SCRoomWithoutReferences /** * A room - * * @validatable * @indexable */ @@ -113,14 +111,12 @@ export interface SCRoom export interface SCRoomSpecificValues extends SCThingWithCategoriesSpecificValues { /** * Category specific opening hours of the room - * * @keyword */ openingHours?: string; /** * Category specific service hours of the room (e.g. cooked food serving hours) - * * @see http://wiki.openstreetmap.org/wiki/Key:opening_hours/specification * @keyword */ diff --git a/packages/core/src/things/semester.ts b/packages/core/src/things/semester.ts index fa34fab8..4392611a 100644 --- a/packages/core/src/things/semester.ts +++ b/packages/core/src/things/semester.ts @@ -26,7 +26,6 @@ import {SCThingMeta, SCThingType} from './abstract/thing.js'; export interface SCSemesterWithoutReferences extends SCAcademicTermWithoutReferences { /** * The short name of the semester, using the given pattern. - * * @filterable * @pattern ^(WS|SS|WiSe|SoSe) [0-9]{4}(/[0-9]{2})?$ * @keyword @@ -41,7 +40,6 @@ export interface SCSemesterWithoutReferences extends SCAcademicTermWithoutRefere /** * A semester - * * @validatable * @indexable */ diff --git a/packages/core/src/things/setting.ts b/packages/core/src/things/setting.ts index f7652a59..c22eef9d 100644 --- a/packages/core/src/things/setting.ts +++ b/packages/core/src/things/setting.ts @@ -38,7 +38,6 @@ export interface SCSettingWithoutReferences inputType: SCSettingInputType; /** * The order number this setting should show up in its category list - * * @integer */ order: number; @@ -78,7 +77,6 @@ export enum SCSettingInputType { /** * A setting with references - * * @validatable */ export interface SCSetting @@ -111,7 +109,6 @@ export type SCSettingValues = SCSettingValue[]; export interface SCSettingValueTranslatableProperties extends SCThingWithCategoriesTranslatableProperties { /** * The translations of the possible values of a setting - * * @keyword */ values?: string[]; diff --git a/packages/core/src/things/sport-course.ts b/packages/core/src/things/sport-course.ts index 8d5c4b56..b2415e53 100644 --- a/packages/core/src/things/sport-course.ts +++ b/packages/core/src/things/sport-course.ts @@ -28,7 +28,6 @@ export interface SCSportCourseWithoutReferences extends SCEventWithoutReferences /** * A sport course - * * @validatable * @indexable */ diff --git a/packages/core/src/things/study-module.ts b/packages/core/src/things/study-module.ts index a315120b..2b7be104 100644 --- a/packages/core/src/things/study-module.ts +++ b/packages/core/src/things/study-module.ts @@ -32,7 +32,6 @@ import {SCPersonWithoutReferences} from './person.js'; export interface SCStudyModuleWithoutReferences extends SCThingThatCanBeOfferedWithoutReferences { /** * ECTS points (European Credit Transfer System) - * * @float */ ects: number; @@ -44,7 +43,6 @@ export interface SCStudyModuleWithoutReferences extends SCThingThatCanBeOfferedW /** * Majors that this study module is meant for - * * @filterable * @keyword */ @@ -68,7 +66,6 @@ export interface SCStudyModuleWithoutReferences extends SCThingThatCanBeOfferedW /** * A study module - * * @validatable * @indexable */ @@ -115,7 +112,6 @@ export interface SCStudyModule export interface SCStudyModuleTranslatableProperties extends SCThingThatCanBeOfferedTranslatableProperties { /** * Translations of the majors that this study module is meant for - * * @keyword */ majors?: string[]; diff --git a/packages/core/src/things/ticket.ts b/packages/core/src/things/ticket.ts index b0ee8a02..67cacc64 100644 --- a/packages/core/src/things/ticket.ts +++ b/packages/core/src/things/ticket.ts @@ -28,7 +28,6 @@ export interface SCTicketWithoutReferences extends SCThingWithoutReferences { /** * Waiting number of the ticket - * * @keyword */ currentTicketNumber: string; @@ -46,7 +45,6 @@ export interface SCTicketWithoutReferences extends SCThingWithoutReferences { /** * A ticket - * * @validatable * @indexable */ diff --git a/packages/core/src/things/todo.ts b/packages/core/src/things/todo.ts index 2da4be99..4e293bb5 100644 --- a/packages/core/src/things/todo.ts +++ b/packages/core/src/things/todo.ts @@ -35,7 +35,6 @@ export interface SCToDoWithoutReferences /** * A date when the "to do" is due - * * @filterable */ dueDate?: SCISO8601Date; @@ -53,7 +52,6 @@ export interface SCToDoWithoutReferences /** * A "to do" - * * @validatable * @indexable */ diff --git a/packages/core/src/things/tour.ts b/packages/core/src/things/tour.ts index 7e4850a3..3dde7d12 100644 --- a/packages/core/src/things/tour.ts +++ b/packages/core/src/things/tour.ts @@ -21,7 +21,6 @@ import {SCThing, SCThingMeta, SCThingType, SCThingWithoutReferences} from './abs export interface SCTourWithoutReferences extends SCThingWithoutReferences { /** * Init script for the tour - * * @text */ init?: string; @@ -33,7 +32,6 @@ export interface SCTourWithoutReferences extends SCThingWithoutReferences { /** * Type of a tour - * * @keyword */ type: SCThingType.Tour; @@ -41,7 +39,6 @@ export interface SCTourWithoutReferences extends SCThingWithoutReferences { /** * A tour - * * @validatable * @indexable */ @@ -98,7 +95,6 @@ export type SCTourStep = SCTourStepMenu | SCTourStepLocation | SCTourStepTooltip export interface SCTourStepLocation { /** * Location to go to - * * @keyword */ location: string; @@ -120,7 +116,6 @@ export interface SCTourStepTooltip { /** * Element that the tooltip shall be pointing at or a list of elements to try in the specified order - * * @keyword */ element: string | string[]; @@ -137,14 +132,12 @@ export interface SCTourStepTooltip { /** * Text that the tooltip shall contain - * * @text */ text: string; /** * How often it shall be retried - * * @integer */ tries?: number; @@ -181,7 +174,6 @@ export interface SCTourStepMenu { export interface SCTourResolvedElement { /** * Element name - * * @keyword */ element: string; @@ -193,7 +185,6 @@ export interface SCTourResolvedElement { export interface SCTourResolvedEvent { /** * Event name - * * @keyword */ event: string; @@ -215,7 +206,6 @@ export interface SCTourResolvedLocation { export interface SCTourResolvedLocationTypeIs { /** * Specific location name - * * @keyword */ is: string; @@ -227,7 +217,6 @@ export interface SCTourResolvedLocationTypeIs { export interface SCTourResolvedLocationTypeMatch { /** * Regex location name - * * @keyword */ match: string; diff --git a/packages/core/src/things/video.ts b/packages/core/src/things/video.ts index bc14bd37..2109c425 100644 --- a/packages/core/src/things/video.ts +++ b/packages/core/src/things/video.ts @@ -48,7 +48,6 @@ export interface SCVideoWithoutReferences /** * URLs to a thumbnails for the Video - * * @keyword */ thumbnails?: string[]; @@ -60,7 +59,6 @@ export interface SCVideoWithoutReferences /** * A Transcript of the Video - * * @text */ transcript?: string; @@ -79,35 +77,30 @@ export interface SCVideoWithoutReferences export interface SCVideoSource { /** * Pixel Height of the Video - * * @integer */ height?: number; /** * MIME-Type of the source File - * * @filterable */ mimeType: SCVideoMimeType; /** * Size of the Video File in bytes - * * @integer */ size?: number; /** * URL to the Video File - * * @keyword */ url: string; /** * Pixel Width of the Video - * * @integer */ width?: number; @@ -121,14 +114,12 @@ export interface SCVideoTrack { /** * Content Type of the Track File - * * @filterable */ type: SCVideoTrackTypes; /** * URL to the Track File - * * @keyword */ url: string; @@ -136,7 +127,6 @@ export interface SCVideoTrack { /** * A video - * * @validatable * @indexable */ diff --git a/packages/core/src/translator.ts b/packages/core/src/translator.ts index a9d7a7e2..0684b43b 100644 --- a/packages/core/src/translator.ts +++ b/packages/core/src/translator.ts @@ -36,7 +36,6 @@ export class SCThingTranslator { /** * Setter for language property. Also flushes translation cache - * * @param language The language the translator instance will use from now on */ set language(language: SCLanguageCode) { @@ -87,7 +86,6 @@ export class SCThingTranslator { /** * Get field value translation recursively - * * @param data The intermediate object / primitive returned by the Proxys get() method * @returns a T object allowing for access to translations or a translated value(s) */ @@ -101,7 +99,6 @@ export class SCThingTranslator { /** * Applies only known field translations of the given SCThings meta class to an instance - * * @param thingType The type of thing that will be translated * @param language The language the thing property values are translated to * @returns The thing with all known meta values translated @@ -132,7 +129,6 @@ export class SCThingTranslator { /** * Returns meta class needed for translations given a SCThingType - * * @param thingType Type of the thing * @returns An instance of the metaclass */ @@ -147,7 +143,6 @@ export class SCThingTranslator { /** * Applies known field value translations of the given SCThings meta class to an instance * Translated values overwrite current values inplace (destructive) - * * @param instance The thing / object that will be translated * @param language The language the thing / object is translated to * @returns The thing with translated meta field values @@ -187,7 +182,6 @@ export class SCThingTranslator { /** * Recursively translates the given object in-place * Translated values overwrite current values (destructive) - * * @param instance The thing / object that will be translated * @returns The thing translated */ @@ -219,7 +213,6 @@ export class SCThingTranslator { /** * Recursively translates the given object in-place * Translated values overwrite current values (destructive) - * * @param thing The thing / object that will be translated * @returns The thing translated */ @@ -240,7 +233,6 @@ export class SCThingTranslator { /** * Get field value translation recursively - * * @example * const dish: SCDish = {...}; * translator.translate(dish).offers[0].inPlace.categories[1]()); @@ -274,7 +266,6 @@ export class SCThingTranslator { /** * Given a SCThingType this function returns an object with the same basic structure as the corresponding SCThing * All the values will be set to the known translations of the property/key name - * * @example * const translatedMetaDish = translator.translatedPropertyNames(SCThingType.CourseOfStudy); * @param type The type whose property names will be translated @@ -287,7 +278,6 @@ export class SCThingTranslator { /** * Given a SCThingType and a corresponding property name it returns the known property value translation * Access pattern to the meta object containing the translation can be thought of as type.field[key] with key being optional - * * @example * const singleValueTranslation = translator.translatedPropertyValue(SCThingType.Dish, 'categories', 'main dish'); * @param type The type for whose property values a translation is required @@ -348,7 +338,6 @@ class LRUCache { /** * Get content from cache by key or by another objects uid - * * @param somethingOrKey The key which maps to the cached content or an object for which content has been cached * @returns If available the content connected to the key or somethingOrKey.uid property */ @@ -374,7 +363,6 @@ class LRUCache { /** * Place content in cache by key - * * @param key The key for which content should be cached * @param content The content that should be cached */ @@ -389,7 +377,6 @@ class LRUCache { /** * Place content in cache by another objects uid - * * @param something The object that should be cached under something.uid */ public putObject(something: U) { diff --git a/packages/easy-ast/package.json b/packages/easy-ast/package.json index 52679ade..6dd6590b 100644 --- a/packages/easy-ast/package.json +++ b/packages/easy-ast/package.json @@ -21,7 +21,7 @@ "@openstapps/collection-utils": "workspace:*", "@openstapps/logger": "workspace:*", "glob": "10.2.6", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "devDependencies": { "@openstapps/eslint-config": "workspace:*", diff --git a/packages/easy-ast/src/easy-ast.ts b/packages/easy-ast/src/easy-ast.ts index e8bb41d9..13b55b2c 100644 --- a/packages/easy-ast/src/easy-ast.ts +++ b/packages/easy-ast/src/easy-ast.ts @@ -40,7 +40,6 @@ import {mapValues, groupBy, keyBy} from '@openstapps/collection-utils'; /** * Convert a TypeScript project to a lightweight Type-AST representation of the project - * * @param sourcePath either a directory or a set of input files * @param includeComments if comments should be included (default true) */ @@ -53,7 +52,6 @@ export function lightweightProjectFromPath( /** * Convert a TypeScript project to a set of lightweight definition ASTs - * * @param sourcePath either a directory or a set of input files * @param includeComments if comments should be included (default true) */ diff --git a/packages/es-mapping-generator/src/app.ts b/packages/es-mapping-generator/src/app.ts index b12c1336..4f79c706 100644 --- a/packages/es-mapping-generator/src/app.ts +++ b/packages/es-mapping-generator/src/app.ts @@ -61,21 +61,21 @@ commander } // write documentation to file - if (typeof options.aggPath !== 'undefined') { + if (options.aggPath !== undefined) { const aggPath = path.resolve(options.aggPath); mkdirSync(path.dirname(aggPath), {recursive: true}); // tslint:disable-next-line:no-magic-numbers writeFileSync(aggPath, JSON.stringify(result.aggregations, null, 2)); console.log(`Elasticsearch aggregations written to ${aggPath}.`); } - if (typeof options.mappingPath !== 'undefined') { + if (options.mappingPath !== undefined) { const mappingPath = path.resolve(options.mappingPath); mkdirSync(path.dirname(mappingPath), {recursive: true}); // tslint:disable-next-line:no-magic-numbers writeFileSync(mappingPath, JSON.stringify(result.mappings, null, 2)); console.log(`Elasticsearch mappings written to ${mappingPath}.`); } - if (typeof options.errorPath !== 'undefined') { + if (options.errorPath !== undefined) { const errorPath = path.resolve(options.errorPath); mkdirSync(path.dirname(errorPath), {recursive: true}); // tslint:disable-next-line:no-magic-numbers diff --git a/packages/es-mapping-generator/src/config/typemap.ts b/packages/es-mapping-generator/src/config/typemap.ts index 37dfbd9d..871b20a2 100644 --- a/packages/es-mapping-generator/src/config/typemap.ts +++ b/packages/es-mapping-generator/src/config/typemap.ts @@ -51,7 +51,7 @@ export const typemap: ElasticsearchTypemap = { */ export function isTagType(string_: string): boolean { for (const key in typemap) { - if (typemap.hasOwnProperty(key) && typeof typemap[key][string_] !== 'undefined') { + if (typemap.hasOwnProperty(key) && typemap[key][string_] !== undefined) { return true; } } diff --git a/packages/es-mapping-generator/src/mapping.ts b/packages/es-mapping-generator/src/mapping.ts index 1c1dab63..17587372 100644 --- a/packages/es-mapping-generator/src/mapping.ts +++ b/packages/es-mapping-generator/src/mapping.ts @@ -59,7 +59,6 @@ let inheritTagsMap: {[path: string]: CommentTag[]} = {}; /** * Gets all interfaces that have an @indexable tag - * * @param projectReflection the project reflection from which to extract the indexable interfaces */ export function getAllIndexableInterfaces(projectReflection: ProjectReflection): DeclarationReflection[] { @@ -78,18 +77,13 @@ export function getAllIndexableInterfaces(projectReflection: ProjectReflection): // filter all declaration reflections with an @indexable tag indexableInterfaces = indexableInterfaces.filter(declarationReflection => { - if ( - typeof declarationReflection.comment === 'undefined' || - typeof declarationReflection.comment.tags === 'undefined' - ) { + if (declarationReflection.comment === undefined || declarationReflection.comment.tags === undefined) { return false; } - return ( - typeof declarationReflection.comment.tags.find(commentTag => { - return commentTag.tagName === indexableTag; - }) !== 'undefined' - ); + return declarationReflection.comment.tags.some(commentTag => { + return commentTag.tagName === indexableTag; + }); }); return indexableInterfaces; @@ -97,7 +91,6 @@ export function getAllIndexableInterfaces(projectReflection: ProjectReflection): /** * Composes error messages, that are readable and contain a certain minimum of information - * * @param path the path where the error took place * @param topTypeName the name of the SCThingType * @param typeName the name of the object, with which something went wrong @@ -124,7 +117,6 @@ function composeErrorMessage( /** * Trims a string to a readable size and appends "..." - * * @param value the string to trim * @param maxLength the maximum allowed length before it is clamped */ @@ -137,7 +129,6 @@ function trimString(value: string, maxLength: number): string { * * Warning to future maintainers: The code for generics doesn't account for depth. when there is a new generic, it will * override the previous one, if there isn't, it will just continue passing it down. - * * @param type the ReferenceType of a DeclarationReflection * @param out the previous reflection, it then overrides all parameters or keeps old ones * @param topTypeName the name of the object, with which something went wrong @@ -152,9 +143,9 @@ function getReflectionGeneric( tags: CommentTag[], ): Map { if ( - typeof type.typeArguments !== 'undefined' && + type.typeArguments !== undefined && type.reflection instanceof DeclarationReflection && - typeof type.reflection.typeParameters !== 'undefined' + type.reflection.typeParameters !== undefined ) { for (let i = 0; i < type.reflection.typeParameters.length; i++) { if (i < type.typeArguments.length) { @@ -185,7 +176,6 @@ function getReflectionGeneric( * Handles a ReferenceType that has no value * * Most of the times that is an external type. - * * @param ref the ReferenceType * @param generics the generics from levels above, so we can use them without having access to the parent * @param path the current path to the object we are in @@ -207,7 +197,7 @@ function handleExternalType( if (ref.name === 'Array') { // basically an external type, but Array is quite common, especially with generics - if (typeof ref.typeArguments === 'undefined' || typeof ref.typeArguments[0] === 'undefined') { + if (ref.typeArguments === undefined || ref.typeArguments[0] === undefined) { composeErrorMessage(path, topTypeName, 'Array with generics', 'array', 'Failed to parse'); return {type: PARSE_ERROR}; @@ -241,7 +231,6 @@ function handleExternalType( /** * Handles an object - * * @param decl the DeclarationReflection of the object * @param generics the generics from levels above, so we can use them without having access to the parent * @param path the current path to the object we are in @@ -270,10 +259,10 @@ function handleDeclarationReflection( let empty = true; // first check if there are any index signatures, so for example `[name: string]: Foo` - if (typeof decl.indexSignature !== 'undefined') { + if (decl.indexSignature !== undefined) { out.dynamic = true; - if (typeof decl.indexSignature.type !== 'undefined') { + if (decl.indexSignature.type !== undefined) { empty = false; const template: Record = {}; template[decl.name] = { @@ -297,7 +286,7 @@ function handleDeclarationReflection( } // check all the children, so in this case we are dealing with an OBJECT - if (typeof decl.children !== 'undefined' && decl.children.length > 0) { + if (decl.children !== undefined && decl.children.length > 0) { for (const child of decl.children) { empty = false; out.properties![child.name] = handleDeclarationReflection( @@ -312,7 +301,7 @@ function handleDeclarationReflection( // get inherited tags const tags = (inheritedTags ?? []).length > 0 - ? typeof inheritedTags!.find(it => isTagType(it.tagName)) !== 'undefined' + ? inheritedTags!.some(it => isTagType(it.tagName)) ? inheritedTags! : [...(inheritedTags ?? []), ...getCommentTags(decl, path, topTypeName)] : getCommentTags(decl, path, topTypeName); @@ -336,7 +325,6 @@ function handleDeclarationReflection( /** * Reads all comment tags, including inherited ones - * * @param decl the DeclarationReflection to read the tags from * @param path the path on which the comments lie * @param topTypeName the name of the SCThingType @@ -357,7 +345,7 @@ function getCommentTags( let out: CommentTag[] = decl.comment instanceof Comment - ? typeof decl.comment.tags !== 'undefined' + ? decl.comment.tags !== undefined ? decl.comment.tags : inheritedTags : inheritedTags; @@ -382,7 +370,7 @@ function getCommentTags( saveCommentTags(out, path, topTypeName); const inheritTag = out.find(value => value.tagName === inheritTagsName); - if (typeof inheritTag !== 'undefined') { + if (inheritTag !== undefined) { out = arrayPriorityJoin(out, retrieveCommentTags(inheritTag.text.trim(), path, topTypeName)); } @@ -391,7 +379,6 @@ function getCommentTags( /** * Saves all comment tags to the map - * * @param tags all tags to be saved (@see and @[inheritTags] will be stripped) * @param path the path of field * @param topTypeName the name of the SCThingType @@ -404,7 +391,6 @@ function saveCommentTags(tags: CommentTag[], path: string, topTypeName: string) /** * Retrieves any saved tags - * * @param path the path to the original field * @param currentPath the current path to the object we are in * @param topTypeName the name of the SCThingType @@ -421,7 +407,6 @@ function retrieveCommentTags(path: string, currentPath: string, topTypeName: str /** * Joins two arrays of CommentTags, but overrides all original CommentTags with the same tagName - * * @param originals the original array * @param overrider the array that should be appended and provide the override values */ @@ -445,7 +430,6 @@ function arrayPriorityJoin(originals: CommentTag[], overrider: CommentTag[]): Co * * Put into a separate function as it is a little bit more complex * Works fairly reliable, although there are issues with primitive union types, which don't work at all (And never will) - * * @param type the type object * @param generics the generics from levels above, so we can use them without having access to the parent * @param path the current path to the object we are in @@ -491,7 +475,6 @@ function handleUnionType( /** * Serves as a kind of distributor for the different types, should not contain any specific code - * * @param type the type object * @param generics the generics from levels above, so we can use them without having access to the parent * @param path the current path to the object we are in @@ -533,7 +516,7 @@ function handleType( return handleUnionType(type, new Map(generics), path, topTypeName, tags); } if (type instanceof ReferenceType) { - if (typeof premaps[type.name] === 'undefined' && typeof type.reflection !== 'undefined') { + if (premaps[type.name] === undefined && type.reflection !== undefined) { // there is really no way to make this typesafe, every element in DeclarationReflection is optional. return handleDeclarationReflection( type.reflection as DeclarationReflection, @@ -571,7 +554,6 @@ function handleType( /** * Adds an aggregatable to the aggregations list - * * @param path the current path * @param topTypeName the name of the top type * @param global whether the topTypeName will be used @@ -602,7 +584,6 @@ function addAggregatable(path: string, topTypeName: string, global: boolean) { /** * Reads all tags related to Elasticsearch fields from the fieldMap - * * @param previous the previous ElasticsearchValue, for example and object * @param path the current path to the object we are in * @param topTypeName the name of the SCThingType @@ -622,15 +603,15 @@ function readFieldTags( } if (!ignoredTagsList.includes(tag.tagName)) { - if (typeof fieldmap[tag.tagName] !== 'undefined') { - if (typeof previous.fields === 'undefined') { + if (fieldmap[tag.tagName] !== undefined) { + if (previous.fields === undefined) { // create in case it doesn't exist previous.fields = {}; } if (tag.text.trim() === '') { // merge fields previous.fields = {...previous.fields, ...fieldmap[tag.tagName].default}; - } else if (typeof fieldmap[tag.tagName][tag.text.trim()] !== 'undefined') { + } else if (fieldmap[tag.tagName][tag.text.trim()] !== undefined) { // merge fields previous.fields = {...previous.fields, ...fieldmap[tag.tagName][tag.text.trim()]}; } else if (!fieldmap[tag.tagName].ignore.includes(tag.text.trim())) { @@ -644,12 +625,12 @@ function readFieldTags( ); } } else if (tag.tagName === filterableTagName) { - if (typeof previous.fields === 'undefined') { + if (previous.fields === undefined) { previous.fields = {}; } if ('type' in previous) { const type = filterableMap[previous.type!]; - if (typeof type !== 'undefined') { + if (type !== undefined) { // merge fields previous.fields = {...previous.fields, raw: {type: type}}; } else { @@ -664,7 +645,7 @@ function readFieldTags( } else { composeErrorMessage(path, topTypeName, 'tag', tag.tagName, 'Not applicable for object types'); } - } else if (typeof dataType === 'undefined' || typeof typemap[dataType][tag.tagName] === 'undefined') { + } else if (dataType === undefined || typemap[dataType][tag.tagName] === undefined) { composeErrorMessage(path, topTypeName, 'tag', tag.tagName, `Not implemented tag`); } } @@ -675,7 +656,6 @@ function readFieldTags( /** * Reads all types related to Elasticsearch fields from the fieldMap - * * @param type the type of the value * @param path the current path to the object we are in * @param topTypeName the name of the SCThingType @@ -684,13 +664,10 @@ function readFieldTags( function readTypeTags(type: string, path: string, topTypeName: string, tags: CommentTag[]): MappingProperty { let out: MappingProperty = {type: PARSE_ERROR}; - if (typeof typemap[type] !== 'undefined') { + if (typemap[type] !== undefined) { // first look if the value has a definition in the typemap for (let i = tags.length - 1; i >= 0; i--) { - if ( - !ignoredTagsList.includes(tags[i].tagName) && - typeof typemap[type][tags[i].tagName] !== 'undefined' - ) { + if (!ignoredTagsList.includes(tags[i].tagName) && typemap[type][tags[i].tagName] !== undefined) { // if we have a tag that indicates a type if (out.type !== PARSE_ERROR) { composeErrorMessage( @@ -735,7 +712,6 @@ function readTypeTags(type: string, path: string, topTypeName: string, tags: Com * * This is kind of a suboptimal solution and should be changed in the future. * https://gitlab.com/openstapps/core-tools/-/issues/49 - * * @param resetInheritTags whether inherited tags should be reset as well */ function reset(resetInheritTags = true) { @@ -761,7 +737,6 @@ function reset(resetInheritTags = true) { * Serves as the entry point for getting the mapping, so if you just want to get the mapping files for Elasticsearch, * you can do so by calling this function, `RETURNED_VALUE.template` contains the mapping in a fashion that is directly * readable by Elasticsearch. - * * @param projectReflection a reflection of the project you want to get the ES Mappings from * @param ignoredTags the tag names for which the error output should be suppressed * @param showErrorOutput whether to print all errors in the command line or not @@ -795,7 +770,7 @@ export function generateTemplate( return declarationReflection.name === 'type'; }); - if (typeof typeObject === 'undefined' || typeof typeObject.type === 'undefined') { + if (typeObject === undefined || typeObject.type === undefined) { throw new TypeError('Interface needs a type to be indexable'); } @@ -845,7 +820,7 @@ export function generateTemplate( return declarationReflection.name === 'type'; }); - if (typeof typeObject === 'undefined' || typeof typeObject.type === 'undefined') { + if (typeObject === undefined || typeObject.type === undefined) { throw new TypeError('Interface needs a type to be indexable'); } @@ -873,7 +848,7 @@ export function generateTemplate( } // filter out - if (interfaceFilter.length > 0 && typeof interfaceFilter.find(it => it === typeName) === 'undefined') { + if (interfaceFilter.length > 0 && !interfaceFilter.includes(typeName)) { continue; } diff --git a/packages/es-mapping-generator/src/project-reflection.ts b/packages/es-mapping-generator/src/project-reflection.ts index 26def6a0..73496a47 100644 --- a/packages/es-mapping-generator/src/project-reflection.ts +++ b/packages/es-mapping-generator/src/project-reflection.ts @@ -19,7 +19,6 @@ import {Application, ProjectReflection} from 'typedoc'; /** * Get a project reflection from a path - * * @param sourcePath Path to get reflection from * @param excludeExternals Exclude external dependencies */ @@ -49,7 +48,7 @@ export function getProjectReflection(sourcePath: PathLike, excludeExternals = tr // get project reflection from input files const result = app.convert(inputFiles); - if (typeof result === 'undefined') { + if (result === undefined) { throw new TypeError('Project reflection could not be generated.'); } @@ -58,7 +57,6 @@ export function getProjectReflection(sourcePath: PathLike, excludeExternals = tr /** * Get path that contains a tsconfig.json - * * @param startPath Path from where to start searching "upwards" */ export function getTsconfigPath(startPath: string): string { diff --git a/packages/es-mapping-generator/src/types/aggregation.ts b/packages/es-mapping-generator/src/types/aggregation.ts index 7972008a..7df0709d 100644 --- a/packages/es-mapping-generator/src/types/aggregation.ts +++ b/packages/es-mapping-generator/src/types/aggregation.ts @@ -15,7 +15,6 @@ /** * An elasticsearch bucket aggregation - * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-aggregations-bucket.html */ export interface AggregationSchema { diff --git a/packages/es-mapping-generator/test/mapping-model/map-agg-test.ts b/packages/es-mapping-generator/test/mapping-model/map-agg-test.ts index c98d8973..bd61a789 100644 --- a/packages/es-mapping-generator/test/mapping-model/map-agg-test.ts +++ b/packages/es-mapping-generator/test/mapping-model/map-agg-test.ts @@ -39,7 +39,7 @@ export class MapAggTest { testInterfaceAgainstPath(options: MapAggTestOptions) { const template = generateTemplate(this.reflection, options.ignoredTags ?? [], false, [options.name]); - if (typeof options.err === 'undefined') { + if (options.err === undefined) { expect(template.errors).to.be.deep.equal([], 'Unexpected Error!'); } else { for (const error of template.errors) { @@ -47,7 +47,7 @@ export class MapAggTest { } } - if (typeof options.agg !== 'undefined') { + if (options.agg !== undefined) { const expectedAggSchema = MapAggTest.buildAggregation( options.name, options.agg.fields, @@ -56,7 +56,7 @@ export class MapAggTest { expect(template.aggregations).to.be.deep.equal(expectedAggSchema, 'Aggregation schema not equal!'); } - if (typeof options.map !== 'undefined') { + if (options.map !== undefined) { const expectedMappingSchema = MapAggTest.buildMapping(options.name, options.map); expect(template.mappings).to.be.deep.equal(expectedMappingSchema, 'Mapping schema not equal!'); } @@ -81,7 +81,7 @@ export class MapAggTest { }; } - if (typeof fields === 'undefined' || fields.length === 0) { + if (fields === undefined || fields.length === 0) { return out; } diff --git a/packages/gitlab-api/package.json b/packages/gitlab-api/package.json index 3fa846b5..9f1edc2d 100644 --- a/packages/gitlab-api/package.json +++ b/packages/gitlab-api/package.json @@ -32,12 +32,10 @@ "@openstapps/prettier-config": "workspace:*", "@openstapps/tsconfig": "workspace:*", "@types/node": "18.15.3", - "@typescript-eslint/eslint-plugin": "5.49.0", - "@typescript-eslint/parser": "5.49.0", "ts-node": "10.9.1", "tsup": "6.7.0", "typedoc": "0.24.7", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "tsup": { "entry": [ diff --git a/packages/gitlab-api/src/api.ts b/packages/gitlab-api/src/api.ts index 13de6048..83f82ad4 100644 --- a/packages/gitlab-api/src/api.ts +++ b/packages/gitlab-api/src/api.ts @@ -39,7 +39,6 @@ export * from './types.js'; /** * Sleep for a number of milliseconds - * * @param ms Number of milliseconds to wait */ export async function sleep(ms: number): Promise { @@ -105,7 +104,6 @@ export class Api { /** * Instantiate new GitLab API - * * @param rootUrl Root URL of the GitLab API * @param privateToken Private token for the GitLab API */ @@ -116,7 +114,6 @@ export class Api { /** * Add member to a group or a project - * * @param scope MembershipScope of the ID * @param id ID of the group or project * @param userId ID of the user @@ -139,7 +136,6 @@ export class Api { /** * Create an issue in GitLab - * * @param projectId ID of the project to create the issue in * @param title Title of the issue * @param description Description of the issue (can contain slash commands) @@ -156,7 +152,6 @@ export class Api { /** * Create a new label - * * @param projectId ID of the project to create the label in * @param name Name of the label to create * @param description Description of the label to create @@ -185,7 +180,6 @@ export class Api { /** * Create a milestone in a project - * * @param projectId Project ID to create milestone in * @param title Title of the milestone to create */ @@ -197,7 +191,6 @@ export class Api { /** * Create a note (comment) in an issue/merge request - * * @param projectId Project ID, the issue belongs to * @param scope Scope of the note * @param iid IID of the issue/merge request to create the note in @@ -214,7 +207,6 @@ export class Api { /** * Delete a label - * * @param projectId ID of the project to delete the label from * @param name Name of the label to delete */ @@ -226,7 +218,6 @@ export class Api { /** * Delete a member from a group or a project - * * @param scope MembershipScope of the ID * @param id ID of the group or project * @param userId ID of the user @@ -237,7 +228,6 @@ export class Api { /** * Edit an existing label - * * @param projectId ID of the project to edit the label in * @param name Name of the label to edit * @param newValues New values for the label @@ -260,7 +250,6 @@ export class Api { /** * Edit member in a group or a project - * * @param scope MembershipScope of the ID * @param id ID of the group or project * @param userId ID of the user @@ -283,7 +272,6 @@ export class Api { /** * Get branches for a project - * * @param projectId Project ID to get branches for */ public async getBranchesForProject(projectId: number): Promise { @@ -292,7 +280,6 @@ export class Api { /** * Get a file from GitLab - * * @param projectId ID of the project the file belongs to * @param filePath Path to the file - url encoded * @param commitish Commitish of the file @@ -307,7 +294,6 @@ export class Api { /** * Get a list of files - * * @param projectId ID of the project */ public async getFileList(projectId: number): Promise { @@ -316,7 +302,6 @@ export class Api { /** * Get issues - * * @param options Options to get issues */ public async getIssues(options: ApiGetIssuesOptions = {}): Promise { @@ -348,7 +333,6 @@ export class Api { /** * Get labels of a project - * * @param projectId ID of the project to get the labels for */ public async getLabels(projectId: number): Promise { @@ -357,7 +341,6 @@ export class Api { /** * Get members of a group or a project - * * @param scope MembershipScope of the ID * @param id ID of the group or project */ @@ -367,7 +350,6 @@ export class Api { /** * Get a merge request approval - * * @param projectId ID of the project the merge request belongs to * @param mergeRequestIid IID of the merge request */ @@ -382,7 +364,6 @@ export class Api { /** * Get discussions of a merge request - * * @param projectId ID of the project the merge request belongs to * @param mergeRequestIid IID of the merge request */ @@ -394,7 +375,6 @@ export class Api { /** * Get merge requests of a group or a project - * * @param scope MembershipScope of the ID * @param id ID of the group or project * @param state State to filter the merge requests by @@ -416,7 +396,6 @@ export class Api { /** * Get milestones for a project - * * @param projectId Project ID to get milestones for */ public async getMilestonesForProject(projectId: number): Promise { @@ -425,7 +404,6 @@ export class Api { /** * Get notes for issue - * * @param projectId Project ID of issue to get notes for * @param issue Issue to get notes for */ @@ -435,7 +413,6 @@ export class Api { /** * Get projects for a group - * * @param groupId Group ID to get projects for */ public async getProjectsForGroup(groupId: number): Promise { @@ -444,7 +421,6 @@ export class Api { /** * Get sub groups of a group - * * @param groupId Group ID to get subgroups for */ public async getSubGroupsForGroup(groupId: number): Promise { @@ -453,7 +429,6 @@ export class Api { /** * Get tags of a project - * * @param projectId ID of the project to get the tags for */ public async getTags(projectId: number): Promise { @@ -462,13 +437,12 @@ export class Api { /** * Query a GitLab API URL - * * @param url GitLab API URL to query * @param options HTTP method/verb */ public async makeGitLabAPIRequest(url: string, options?: ApiRequestOptions): Promise { // remove leading slash - const _url = url.replace(/^\/+/g, ''); + const _url = url.replaceAll(/^\/+/g, ''); const _options: Required = { // eslint-disable-next-line unicorn/no-null @@ -533,7 +507,6 @@ export class Api { /** * Protect a branch - * * @param projectId ID of the project the branch belongs to * @param branch Branch to protect */ @@ -548,7 +521,6 @@ export class Api { /** * Set assignee for an issue - * * @param issue Issue to set assignee for * @param userId ID of the assignee to set for the issue */ @@ -563,7 +535,6 @@ export class Api { /** * Set assignee for an merge request - * * @param mergeRequest Merge request to set assignee for * @param userId ID of the assignee to set for the merge request */ @@ -578,7 +549,6 @@ export class Api { /** * Set milestone for an issue - * * @param issue Issue to set milestone for * @param milestoneId ID of the milestone to set for the issue */ diff --git a/packages/logger/package.json b/packages/logger/package.json index 73202336..1a4894b5 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -45,7 +45,7 @@ "ts-node": "10.9.1", "tsup": "6.7.0", "typedoc": "0.24.7", - "typescript": "4.8.4" + "typescript": "4.9.5" }, "tsup": { "entry": [ diff --git a/packages/logger/src/common.ts b/packages/logger/src/common.ts index 5f6b0de1..ad222724 100644 --- a/packages/logger/src/common.ts +++ b/packages/logger/src/common.ts @@ -29,7 +29,6 @@ export type RecursivePartial = { /** * Deletes all properties that are undefined from an object - * * @param object Object to delete undefined properties from */ export function deleteUndefinedProperties(object: unknown): unknown { @@ -47,7 +46,7 @@ export function deleteUndefinedProperties(object: unknown): unknown { const indexedObject = object as {[k: string]: unknown}; - if (typeof indexedObject[key] === 'undefined') { + if (indexedObject[key] === undefined) { // delete undefined keys delete indexedObject[key]; } else { @@ -72,7 +71,7 @@ export function isNodeEnvironment(): boolean { export function isProductiveEnvironment(): boolean { return ( typeof process.env === 'object' && - typeof process.env.NODE_ENV !== 'undefined' && + process.env.NODE_ENV !== undefined && process.env.NODE_ENV === 'production' ); } @@ -86,7 +85,6 @@ export function isProductiveNodeEnvironment(): boolean { /** * Check if a transport is a verifiable transport - * * @param transport Transport to check */ export function isTransportWithVerification(transport: Transport): transport is VerifiableTransport { diff --git a/packages/logger/src/logger.ts b/packages/logger/src/logger.ts index 6218dc5d..ae2a3653 100644 --- a/packages/logger/src/logger.ts +++ b/packages/logger/src/logger.ts @@ -20,7 +20,6 @@ import {Transport} from './transport.js'; /** * Check if something has property STAPPS_LOG_LEVEL - * * @param something Something to check */ // tslint:disable-next-line:completed-docs @@ -30,7 +29,6 @@ function hasStAppsLogLevel(something: object): something is {STAPPS_LOG_LEVEL: n /** * Check if something has property STAPPS_EXIT_LEVEL - * * @param something Something to check */ // tslint:disable-next-line:completed-docs @@ -92,13 +90,12 @@ export class Logger { /** * Apply transformations to an output * Will strip newlines in production environment - * * @param logLevel Log level of the output * @param output Output to apply transformations to */ private static applyTransformers(logLevel: LogLevel, output: string): string { if (isProductiveEnvironment()) { - output = output.replace(/[\n\r]/g, ' '); + output = output.replaceAll(/[\n\r]/g, ' '); } if (!Array.isArray(Logger.transformations) || Logger.transformations.length === 0) { @@ -115,7 +112,6 @@ export class Logger { /** * Check if intended exit level is allowed in environment exit level - * * @param exitLevel Log level to check */ private static checkExitLevel(exitLevel: LogLevel): boolean { @@ -129,7 +125,6 @@ export class Logger { /** * Check if intended log level is allowed in environment log level - * * @param logLevel Log level to check */ private static checkLogLevel(logLevel: LogLevel): boolean { @@ -168,7 +163,7 @@ export class Logger { const environmentLevel = level === 'LOG' ? process.env.STAPPS_LOG_LEVEL : process.env.STAPPS_EXIT_LEVEL; - if (isNodeEnvironment() && typeof environmentLevel !== 'undefined') { + if (isNodeEnvironment() && environmentLevel !== undefined) { // Node.js environment exists return Number.parseInt(environmentLevel, 10); } @@ -186,7 +181,6 @@ export class Logger { /** * Get number of specific log level - * * @param logLevel Log level to check */ private static logLevelNumber(logLevel: LogLevel): number { @@ -195,7 +189,6 @@ export class Logger { /** * Log an error - * * @param arguments_ Arguments to log */ public static async error(...arguments_: unknown[]): Promise { @@ -207,7 +200,7 @@ export class Logger { console.error(Logger.applyTransformers('ERROR', Logger.stringifyArguments(...arguments_))); if (isProductiveNodeEnvironment()) { - if (typeof Logger.transport !== 'undefined') { + if (Logger.transport !== undefined) { return Logger.transport.send('Error', Logger.stringifyArguments(...arguments_)); } @@ -224,7 +217,6 @@ export class Logger { /** * Log an information - * * @param arguments_ Arguments to log */ public static info(...arguments_: unknown[]): void { @@ -243,7 +235,7 @@ export class Logger { * Check if the logger is initialized correctly */ public static initialized(): void { - if (isProductiveNodeEnvironment() && typeof Logger.transport === 'undefined') { + if (isProductiveNodeEnvironment() && Logger.transport === undefined) { if (process.env.ALLOW_NO_TRANSPORT !== 'true') { throw new Error(`Productive environment doesn't set a transport for error notifications.`); } @@ -254,7 +246,6 @@ export class Logger { /** * Log something - * * @param arguments_ Arguments to log */ public static log(...arguments_: unknown[]): void { @@ -271,7 +262,6 @@ export class Logger { /** * Log something successful - * * @param arguments_ Arguments to log */ public static ok(...arguments_: unknown[]): void { @@ -288,7 +278,6 @@ export class Logger { /** * Set transformations for log output - * * @param transformations List of transformations */ public static setTransformations(transformations: Transformation[]) { @@ -300,7 +289,6 @@ export class Logger { /** * Set a transport - * * @param transport Transport to set */ public static setTransport(transport?: Transport) { @@ -309,7 +297,6 @@ export class Logger { /** * Stringify a list of arguments - * * @param arguments_ Arguments to stringify */ public static stringifyArguments(...arguments_: unknown[]): string { @@ -320,7 +307,7 @@ export class Logger { result.push(argument.toString()); } else if (argument instanceof Error) { result.push(argument.message); - if (typeof argument.stack !== 'undefined') { + if (argument.stack !== undefined) { result.push(argument.stack); } } else { @@ -333,7 +320,6 @@ export class Logger { /** * Log a warning - * * @param arguments_ Arguments to log */ public static warn(...arguments_: unknown[]): void { diff --git a/packages/logger/src/smtp.ts b/packages/logger/src/smtp.ts index fc12e98d..139aa6b8 100644 --- a/packages/logger/src/smtp.ts +++ b/packages/logger/src/smtp.ts @@ -125,12 +125,11 @@ export class SMTP extends VerifiableTransport { * SMTP_SENDER_MAIL: sender of the mail * SMTP_SENDER_NAME: name of the sender * SMTP_SECURE: `true` to enable tls - * * @param config SMTP config for instance */ public static getInstance(config?: SMTPConfig): SMTP | undefined { // if an instance of SMTP already exists - if (typeof SMTP._instance !== 'undefined') { + if (SMTP._instance !== undefined) { return SMTP._instance; } @@ -158,7 +157,6 @@ export class SMTP extends VerifiableTransport { * * For more information please consider reading * https://stackoverflow.com/a/2071250 - * * @param address Address to validate */ public static isValidEmailAddress(address: string): boolean { @@ -170,7 +168,6 @@ export class SMTP extends VerifiableTransport { /** * Checks a list of mail addresses for validity - * * @param recipients List of recipients to check */ public static isValidRecipientsList(recipients: string[] | undefined): boolean { @@ -181,7 +178,6 @@ export class SMTP extends VerifiableTransport { * Creates an SMTP connection. * * WARNING: This class is supposed to be used as a singleton. You should never call `new SMTP()` - * * @param smtpConfig SMTP config */ private constructor(smtpConfig?: SMTPConfig) { @@ -191,13 +187,11 @@ export class SMTP extends VerifiableTransport { password: process.env.SMTP_AUTH_PASSWORD, user: process.env.SMTP_AUTH_USER, }, - cc: typeof process.env.SMTP_CC === 'undefined' ? [] : (process.env.SMTP_CC as string).split(','), + cc: process.env.SMTP_CC === undefined ? [] : (process.env.SMTP_CC as string).split(','), host: process.env.SMTP_HOST, - port: - typeof process.env.SMTP_PORT === 'undefined' ? undefined : Number.parseInt(process.env.SMTP_PORT, 10), - recipients: - typeof process.env.SMTP_RECIPIENTS === 'undefined' ? [] : process.env.SMTP_RECIPIENTS.split(','), - secure: typeof process.env.SMTP_SECURE === 'undefined' ? false : process.env.SMTP_SECURE === 'true', + port: process.env.SMTP_PORT === undefined ? undefined : Number.parseInt(process.env.SMTP_PORT, 10), + recipients: process.env.SMTP_RECIPIENTS === undefined ? [] : process.env.SMTP_RECIPIENTS.split(','), + secure: process.env.SMTP_SECURE === undefined ? false : process.env.SMTP_SECURE === 'true', sender: { mail: process.env.SMTP_SENDER_MAIL, name: process.env.SMTP_SENDER_NAME, @@ -210,13 +204,13 @@ export class SMTP extends VerifiableTransport { ...(deleteUndefinedProperties(environmentConfig) as object), } as SMTPConfig; - if (typeof config.host === 'undefined') { + if (config.host === undefined) { throw new TypeError( 'SMTP configuration needs a host. Add it to the config or use environment variables (SMTP_HOST).', ); } - if (typeof config.port === 'undefined' || Number.isNaN(config.port)) { + if (config.port === undefined || Number.isNaN(config.port)) { throw new TypeError( 'SMTP configuration needs a port. Add it to the config or use environment variables (SMTP_PORT).', ); @@ -229,13 +223,13 @@ export class SMTP extends VerifiableTransport { ); } - if (typeof config.auth.user === 'undefined') { + if (config.auth.user === undefined) { throw new TypeError( 'SMTP auth configuration needs a user. Add it to the config or use environment variables (SMTP_AUTH_USER).', ); } - if (typeof config.auth.password === 'undefined') { + if (config.auth.password === undefined) { throw new TypeError( 'SMTP auth configuration needs a password.' + 'Add it to the config or use environment variables (SMTP_AUTH_PASSWORD).', @@ -248,7 +242,7 @@ export class SMTP extends VerifiableTransport { ); } - if (typeof config.sender.mail === 'undefined') { + if (config.sender.mail === undefined) { throw new TypeError( 'SMTP configuration needs a sender. Add it to the config or use environment variables (SMTP_SENDER_MAIL).', ); @@ -262,7 +256,7 @@ export class SMTP extends VerifiableTransport { throw new Error('Invalid recipients found'); } - if (typeof config.cc === 'undefined') { + if (config.cc === undefined) { this.cc = []; } else { if (SMTP.isValidRecipientsList(config.cc)) { @@ -284,7 +278,7 @@ export class SMTP extends VerifiableTransport { }, host: config.host, port: config.port, - secure: typeof config.secure === 'undefined' ? false : config.secure, + secure: config.secure === undefined ? false : config.secure, }); } @@ -298,7 +292,6 @@ export class SMTP extends VerifiableTransport { /** * Sends a preconfigured mail with recipients and sender configured on * creation of the class (set by environment or on creation of this class) - * * @param subject Subject of the mail * @param message message of the mail */ @@ -315,7 +308,6 @@ export class SMTP extends VerifiableTransport { /** * Sends a mail object - * * @param mail Mail to send */ public async sendMail(mail: MailOptions): Promise { @@ -323,7 +315,7 @@ export class SMTP extends VerifiableTransport { let info = await this.transportAgent.sendMail(mail); // it can be undefined (empty response) - if (typeof info === 'undefined') { + if (info === undefined) { info = 'Successfully sent mail'; } @@ -337,8 +329,6 @@ export class SMTP extends VerifiableTransport { /** * Verify authentication with SMTP server - * - * * @throws error if you are in a productive environment and don't set ALLOW_NO_TRANSPORT to true * @returns true if the transport is valid */ diff --git a/packages/logger/src/transformation.ts b/packages/logger/src/transformation.ts index 55a363c1..e26fbd8c 100644 --- a/packages/logger/src/transformation.ts +++ b/packages/logger/src/transformation.ts @@ -25,7 +25,6 @@ export interface Transformation { /** * Transform an output - * * @param logLevel Log level to transform output for * @param output Output to transform */ diff --git a/packages/logger/src/transformations/add-log-level.ts b/packages/logger/src/transformations/add-log-level.ts index 6cb80d92..c49953c3 100644 --- a/packages/logger/src/transformations/add-log-level.ts +++ b/packages/logger/src/transformations/add-log-level.ts @@ -26,7 +26,6 @@ export class AddLogLevel implements Transformation { /** * Add log level to output - * * @param logLevel Log level to add to output * @param output Output to colorize */ diff --git a/packages/logger/src/transformations/colorize.ts b/packages/logger/src/transformations/colorize.ts index 699a5b3e..23caddc4 100644 --- a/packages/logger/src/transformations/colorize.ts +++ b/packages/logger/src/transformations/colorize.ts @@ -29,7 +29,6 @@ export class Colorize implements Transformation { /** * Instantiate a new colorize transformation - * * @param logLevelToColor Map from log level to color transformation to apply */ constructor( @@ -47,7 +46,6 @@ export class Colorize implements Transformation { /** * Colorize log output - * * @param logLevel Log level to choose color for * @param output Output to colorize */ diff --git a/packages/logger/src/transformations/timestamp.ts b/packages/logger/src/transformations/timestamp.ts index 054f9fb3..40b55ed6 100644 --- a/packages/logger/src/transformations/timestamp.ts +++ b/packages/logger/src/transformations/timestamp.ts @@ -26,7 +26,6 @@ export class Timestamp implements Transformation { /** * Add timestamp to output - * * @param _logLevel Log level to add timestamp to output for * @param output Output to add timestamp to */ diff --git a/packages/logger/src/transport.ts b/packages/logger/src/transport.ts index 3b5a654e..b5e41560 100644 --- a/packages/logger/src/transport.ts +++ b/packages/logger/src/transport.ts @@ -21,7 +21,6 @@ export abstract class Transport { * Send message with subject * * A message can be a mail or something completely different depending on what transport is implemented. - * * @param subject Subject of the message * @param message Message to send */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60005adf..9183d86d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,10 +30,10 @@ importers: version: 1.10.0 typedoc: specifier: 0.24.7 - version: 0.24.7(typescript@4.8.4) + version: 0.24.7(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 backend/backend: dependencies: @@ -96,7 +96,7 @@ importers: version: 2.2.5 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) uuid: specifier: 8.3.2 version: 8.3.2 @@ -168,11 +168,11 @@ importers: specifier: 8.3.4 version: 8.3.4 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -189,20 +189,20 @@ importers: specifier: 7.0.3 version: 7.0.3 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) esmock: specifier: 2.2.3 version: 2.2.3 @@ -232,10 +232,10 @@ importers: version: 6.3.3 tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 backend/proxy: dependencies: @@ -270,8 +270,8 @@ importers: specifier: 7.3.8 version: 7.3.8 typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 devDependencies: '@openstapps/eslint-config': specifier: workspace:* @@ -307,11 +307,11 @@ importers: specifier: 3.2.9 version: 3.2.9 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -319,20 +319,20 @@ importers: specifier: 4.3.7 version: 4.3.7 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -347,10 +347,10 @@ importers: version: 3.7.0(chai@4.3.7)(sinon@15.0.4) ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) configuration/backend-config: devDependencies: @@ -364,26 +364,26 @@ importers: specifier: workspace:* version: link:../tsconfig '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) prettier: specifier: 2.8.6 version: 2.8.6 @@ -391,23 +391,23 @@ importers: configuration/eslint-config: dependencies: '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) devDependencies: '@openstapps/tsconfig': specifier: workspace:* @@ -416,11 +416,11 @@ importers: specifier: 18.15.3 version: 18.15.3 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 configuration/nyc-config: {} @@ -445,8 +445,8 @@ importers: specifier: 10.0.0 version: 10.0.0 date-fns: - specifier: 2.29.3 - version: 2.29.3 + specifier: 2.30.0 + version: 2.30.0 glob: specifier: 10.2.6 version: 10.2.6 @@ -485,11 +485,11 @@ importers: specifier: 0.2.3 version: 0.2.3 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -500,20 +500,20 @@ importers: specifier: 7.1.1 version: 7.1.1(chai@4.3.7) eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -522,13 +522,13 @@ importers: version: 2.8.6 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 configuration/tsconfig: {} @@ -572,11 +572,11 @@ importers: specifier: 18.15.3 version: 18.15.3 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -590,20 +590,20 @@ importers: specifier: 2.2.2 version: 2.2.2 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -615,19 +615,22 @@ importers: version: 2.8.6 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 examples/minimal-plugin: dependencies: '@openstapps/api': specifier: workspace:* version: link:../../packages/api + '@openstapps/api-plugin': + specifier: workspace:* + version: link:../../packages/api-plugin '@openstapps/core': specifier: workspace:* version: link:../../packages/core @@ -645,7 +648,7 @@ importers: version: 4.18.2 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) devDependencies: '@openstapps/eslint-config': specifier: workspace:* @@ -663,35 +666,35 @@ importers: specifier: 18.15.3 version: 18.15.3 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) prettier: specifier: 2.8.6 version: 2.8.6 tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 frontend/app: dependencies: @@ -872,7 +875,7 @@ importers: version: 0.1303.9 '@angular-devkit/build-angular': specifier: 13.3.9 - version: 13.3.9(@angular/compiler-cli@13.3.11)(karma@6.4.1)(protractor@7.0.0)(typescript@4.8.4) + version: 13.3.9(@angular/compiler-cli@13.3.11)(karma@6.4.1)(protractor@7.0.0)(typescript@4.6.4) '@angular-devkit/core': specifier: 13.3.9 version: 13.3.9(chokidar@3.5.3) @@ -881,19 +884,19 @@ importers: version: 13.3.9(chokidar@3.5.3) '@angular-eslint/builder': specifier: 13.5.0 - version: 13.5.0(eslint@8.33.0)(typescript@4.8.4) + version: 13.5.0(eslint@8.33.0)(typescript@4.6.4) '@angular-eslint/eslint-plugin': specifier: 13.5.0 - version: 13.5.0(eslint@8.33.0)(typescript@4.8.4) + version: 13.5.0(eslint@8.33.0)(typescript@4.6.4) '@angular-eslint/eslint-plugin-template': specifier: 13.5.0 - version: 13.5.0(eslint@8.33.0)(typescript@4.8.4) + version: 13.5.0(eslint@8.33.0)(typescript@4.6.4) '@angular-eslint/schematics': specifier: 13.5.0 - version: 13.5.0(@angular/cli@13.3.9)(eslint@8.33.0)(typescript@4.8.4) + version: 13.5.0(@angular/cli@13.3.9)(eslint@8.33.0)(typescript@4.6.4) '@angular-eslint/template-parser': specifier: 13.5.0 - version: 13.5.0(eslint@8.33.0)(typescript@4.8.4) + version: 13.5.0(eslint@8.33.0)(typescript@4.6.4) '@angular/cli': specifier: 13.3.9 version: 13.3.9 @@ -902,7 +905,7 @@ importers: version: 13.3.11 '@angular/compiler-cli': specifier: 13.3.11 - version: 13.3.11(@angular/compiler@13.3.11)(typescript@4.8.4) + version: 13.3.11(@angular/compiler@13.3.11)(typescript@4.6.4) '@angular/language-service': specifier: 13.3.11 version: 13.3.11 @@ -962,10 +965,10 @@ importers: version: 18.15.3 '@typescript-eslint/eslint-plugin': specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.6.4) '@typescript-eslint/parser': specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + version: 5.49.0(eslint@8.33.0)(typescript@4.6.4) cordova-res: specifier: 0.15.4 version: 0.15.4 @@ -980,7 +983,7 @@ importers: version: 39.7.4(eslint@8.33.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: specifier: 45.0.2 version: 45.0.2(eslint@8.33.0) @@ -1034,101 +1037,35 @@ importers: version: 0.23.1 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.6.4) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.6.4 + version: 4.6.4 webpack-bundle-analyzer: specifier: 4.7.0 version: 4.7.0 packages/api: dependencies: - '@krlwlfrt/async-pool': - specifier: 0.7.0 - version: 0.7.0 '@openstapps/core': specifier: workspace:* version: link:../core - '@openstapps/core-tools': - specifier: workspace:* - version: link:../core-tools - '@openstapps/logger': - specifier: workspace:* - version: link:../logger - '@types/cli-progress': - specifier: 3.11.0 - version: 3.11.0 - '@types/express': - specifier: 4.17.17 - version: 4.17.17 - '@types/morgan': - specifier: 1.9.4 - version: 1.9.4 - '@types/node': - specifier: 18.15.3 - version: 18.15.3 - '@types/traverse': - specifier: 0.6.32 - version: 0.6.32 '@types/uuid': specifier: 8.3.4 version: 8.3.4 - '@types/wait-on': - specifier: 5.3.1 - version: 5.3.1 - body-parser: - specifier: 1.20.2 - version: 1.20.2 - cli-progress: - specifier: 3.12.0 - version: 3.12.0 - commander: - specifier: 10.0.0 - version: 10.0.0 - express: - specifier: 4.18.2 - version: 4.18.2 - got: - specifier: 12.6.0 - version: 12.6.0 - json-schema: - specifier: 0.4.0 - version: 0.4.0 - moment: - specifier: 2.29.4 - version: 2.29.4 - morgan: - specifier: 1.10.0 - version: 1.10.0 - rfdc: - specifier: 1.3.0 - version: 1.3.0 - traverse: - specifier: 0.6.7 - version: 0.6.7 uuid: specifier: 8.3.2 version: 8.3.2 - wait-on: - specifier: 6.0.1 - version: 6.0.1 devDependencies: '@openstapps/eslint-config': specifier: workspace:* version: link:../../configuration/eslint-config - '@openstapps/nyc-config': - specifier: workspace:* - version: link:../../configuration/nyc-config '@openstapps/prettier-config': specifier: workspace:* version: link:../../configuration/prettier-config '@openstapps/tsconfig': specifier: workspace:* version: link:../../configuration/tsconfig - '@types/body-parser': - specifier: 1.19.2 - version: 1.19.2 '@types/chai': specifier: 4.3.5 version: 4.3.5 @@ -1138,6 +1075,114 @@ importers: '@types/chai-spies': specifier: 1.0.3 version: 1.0.3 + '@types/mocha': + specifier: 10.0.1 + version: 10.0.1 + '@types/traverse': + specifier: 0.6.32 + version: 0.6.32 + '@typescript-eslint/eslint-plugin': + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) + '@typescript-eslint/parser': + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) + c8: + specifier: 7.14.0 + version: 7.14.0 + chai: + specifier: 4.3.7 + version: 4.3.7 + chai-as-promised: + specifier: 7.1.1 + version: 7.1.1(chai@4.3.7) + chai-spies: + specifier: 1.0.0 + version: 1.0.0(chai@4.3.7) + conventional-changelog-cli: + specifier: 2.2.2 + version: 2.2.2 + date-fns: + specifier: 2.30.0 + version: 2.30.0 + eslint: + specifier: 8.41.0 + version: 8.41.0 + eslint-config-prettier: + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) + eslint-plugin-jsdoc: + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) + eslint-plugin-prettier: + specifier: 4.2.1 + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) + eslint-plugin-unicorn: + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) + mocha: + specifier: 10.2.0 + version: 10.2.0 + prettier: + specifier: 2.8.6 + version: 2.8.6 + traverse: + specifier: 0.6.7 + version: 0.6.7 + ts-node: + specifier: 10.9.1 + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) + tsup: + specifier: 6.7.0 + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) + typedoc: + specifier: 0.24.7 + version: 0.24.7(typescript@4.9.5) + typescript: + specifier: 4.9.5 + version: 4.9.5 + undici: + specifier: 5.22.1 + version: 5.22.1 + + packages/api-cli: + devDependencies: + '@openstapps/api': + specifier: workspace:* + version: link:../api + '@openstapps/core': + specifier: workspace:* + version: link:../core + '@openstapps/core-tools': + specifier: workspace:* + version: link:../core-tools + '@openstapps/eslint-config': + specifier: workspace:* + version: link:../../configuration/eslint-config + '@openstapps/logger': + specifier: workspace:* + version: link:../logger + '@openstapps/prettier-config': + specifier: workspace:* + version: link:../../configuration/prettier-config + '@openstapps/tsconfig': + specifier: workspace:* + version: link:../../configuration/tsconfig + '@types/chai': + specifier: 4.3.5 + version: 4.3.5 + '@types/chai-as-promised': + specifier: 7.1.5 + version: 7.1.5 + '@types/chai-spies': + specifier: 1.0.3 + version: 1.0.3 + '@types/cli-progress': + specifier: 3.11.0 + version: 3.11.0 + '@types/express': + specifier: 4.17.17 + version: 4.17.17 '@types/fs-extra': specifier: 9.0.13 version: 9.0.13 @@ -1147,12 +1192,142 @@ importers: '@types/mocha': specifier: 10.0.1 version: 10.0.1 + '@types/node': + specifier: 18.15.3 + version: 18.15.3 + '@types/wait-on': + specifier: 5.3.1 + version: 5.3.1 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) + c8: + specifier: 7.14.0 + version: 7.14.0 + chai: + specifier: 4.3.7 + version: 4.3.7 + chai-as-promised: + specifier: 7.1.1 + version: 7.1.1(chai@4.3.7) + chai-spies: + specifier: 1.0.0 + version: 1.0.0(chai@4.3.7) + cli-progress: + specifier: 3.12.0 + version: 3.12.0 + commander: + specifier: 10.0.0 + version: 10.0.0 + eslint: + specifier: 8.41.0 + version: 8.41.0 + eslint-config-prettier: + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) + eslint-plugin-jsdoc: + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) + eslint-plugin-prettier: + specifier: 4.2.1 + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) + eslint-plugin-unicorn: + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) + fs-extra: + specifier: 10.1.0 + version: 10.1.0 + mocha: + specifier: 10.2.0 + version: 10.2.0 + nock: + specifier: 13.3.1 + version: 13.3.1 + prettier: + specifier: 2.8.6 + version: 2.8.6 + ts-node: + specifier: 10.9.1 + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) + tsup: + specifier: 6.7.0 + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) + typescript: + specifier: 4.9.5 + version: 4.9.5 + wait-on: + specifier: 6.0.1 + version: 6.0.1 + + packages/api-plugin: + dependencies: + '@openstapps/api': + specifier: workspace:* + version: link:../api + '@openstapps/core': + specifier: workspace:* + version: link:../core + '@openstapps/core-tools': + specifier: workspace:* + version: link:../core-tools + '@openstapps/logger': + specifier: workspace:* + version: link:../logger + '@types/body-parser': + specifier: 1.19.2 + version: 1.19.2 + '@types/express': + specifier: 4.17.17 + version: 4.17.17 + '@types/json-schema': + specifier: 7.0.11 + version: 7.0.11 + '@types/morgan': + specifier: 1.9.4 + version: 1.9.4 + body-parser: + specifier: 1.20.2 + version: 1.20.2 + express: + specifier: 4.18.2 + version: 4.18.2 + json-schema: + specifier: 0.4.0 + version: 0.4.0 + morgan: + specifier: 1.10.0 + version: 1.10.0 + devDependencies: + '@openstapps/eslint-config': + specifier: workspace:* + version: link:../../configuration/eslint-config + '@openstapps/prettier-config': + specifier: workspace:* + version: link:../../configuration/prettier-config + '@openstapps/tsconfig': + specifier: workspace:* + version: link:../../configuration/tsconfig + '@types/chai': + specifier: 4.3.5 + version: 4.3.5 + '@types/chai-as-promised': + specifier: 7.1.5 + version: 7.1.5 + '@types/chai-spies': + specifier: 1.0.3 + version: 1.0.3 + '@types/mocha': + specifier: 10.0.1 + version: 10.0.1 + '@typescript-eslint/eslint-plugin': + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) + '@typescript-eslint/parser': + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -1169,23 +1344,20 @@ importers: specifier: 2.2.2 version: 2.2.2 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) - fs-extra: - specifier: 10.1.0 - version: 10.1.0 + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -1197,16 +1369,16 @@ importers: version: 2.8.6 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typedoc: specifier: 0.24.7 - version: 0.24.7(typescript@4.8.4) + version: 0.24.7(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 packages/collection-utils: devDependencies: @@ -1229,11 +1401,11 @@ importers: specifier: 18.15.3 version: 18.15.3 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -1241,20 +1413,20 @@ importers: specifier: 4.3.7 version: 4.3.7 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -1263,16 +1435,16 @@ importers: version: 2.8.6 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typedoc: specifier: 0.24.7 - version: 0.24.7(typescript@4.8.4) + version: 0.24.7(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 packages/core: dependencies: @@ -1332,11 +1504,11 @@ importers: specifier: 18.15.3 version: 18.15.3 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -1347,20 +1519,20 @@ importers: specifier: 1.0.6 version: 1.0.6 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -1375,16 +1547,16 @@ importers: version: 0.23.1 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typedoc: specifier: 0.24.7 - version: 0.24.7(typescript@4.8.4) + version: 0.24.7(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 packages/core-tools: dependencies: @@ -1483,11 +1655,11 @@ importers: specifier: 18.15.3 version: 18.15.3 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -1495,20 +1667,20 @@ importers: specifier: 4.3.7 version: 4.3.7 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -1520,16 +1692,16 @@ importers: version: 2.8.6 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typedoc: specifier: 0.24.7 - version: 0.24.7(typescript@4.8.4) + version: 0.24.7(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 packages/easy-ast: dependencies: @@ -1543,8 +1715,8 @@ importers: specifier: 10.2.6 version: 10.2.6 typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 devDependencies: '@openstapps/eslint-config': specifier: workspace:* @@ -1565,11 +1737,11 @@ importers: specifier: 18.15.3 version: 18.15.3 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -1577,20 +1749,20 @@ importers: specifier: 4.3.7 version: 4.3.7 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -1599,13 +1771,13 @@ importers: version: 2.8.6 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typedoc: specifier: 0.24.7 - version: 0.24.7(typescript@4.8.4) + version: 0.24.7(typescript@4.9.5) packages/es-mapping-generator: dependencies: @@ -1653,11 +1825,11 @@ importers: specifier: 3.0.2 version: 3.0.2 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@3.8.3) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@3.8.3) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@3.8.3) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@3.8.3) c8: specifier: 7.14.0 version: 7.14.0 @@ -1665,20 +1837,20 @@ importers: specifier: 4.3.7 version: 4.3.7 eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -1720,41 +1892,41 @@ importers: specifier: 18.15.3 version: 18.15.3 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) prettier: specifier: 2.8.6 version: 2.8.6 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typedoc: specifier: 0.24.7 - version: 0.24.7(typescript@4.8.4) + version: 0.24.7(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 packages/logger: dependencies: @@ -1796,11 +1968,11 @@ importers: specifier: 18.15.3 version: 18.15.3 '@typescript-eslint/eslint-plugin': - specifier: 5.49.0 - version: 5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: 5.49.0 - version: 5.49.0(eslint@8.33.0)(typescript@4.8.4) + specifier: 5.59.8 + version: 5.59.8(eslint@8.41.0)(typescript@4.9.5) c8: specifier: 7.14.0 version: 7.14.0 @@ -1814,20 +1986,20 @@ importers: specifier: 1.0.0 version: 1.0.0(chai@4.3.7) eslint: - specifier: 8.33.0 - version: 8.33.0 + specifier: 8.41.0 + version: 8.41.0 eslint-config-prettier: - specifier: 8.6.0 - version: 8.6.0(eslint@8.33.0) + specifier: 8.8.0 + version: 8.8.0(eslint@8.41.0) eslint-plugin-jsdoc: - specifier: 39.7.4 - version: 39.7.4(eslint@8.33.0) + specifier: 46.1.0 + version: 46.1.0(eslint@8.41.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6) eslint-plugin-unicorn: - specifier: 45.0.2 - version: 45.0.2(eslint@8.33.0) + specifier: 47.0.0 + version: 47.0.0(eslint@8.41.0) mocha: specifier: 10.2.0 version: 10.2.0 @@ -1836,16 +2008,16 @@ importers: version: 2.8.6 ts-node: specifier: 10.9.1 - version: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + version: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) tsup: specifier: 6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.8.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typedoc: specifier: 0.24.7 - version: 0.24.7(typescript@4.8.4) + version: 0.24.7(typescript@4.9.5) typescript: - specifier: 4.8.4 - version: 4.8.4 + specifier: 4.9.5 + version: 4.9.5 packages: @@ -1879,7 +2051,7 @@ packages: - chokidar dev: true - /@angular-devkit/build-angular@13.3.9(@angular/compiler-cli@13.3.11)(karma@6.4.1)(protractor@7.0.0)(typescript@4.8.4): + /@angular-devkit/build-angular@13.3.9(@angular/compiler-cli@13.3.11)(karma@6.4.1)(protractor@7.0.0)(typescript@4.6.4): resolution: {integrity: sha512-1LqcMizeabx3yOkx3tptCSAoEhG6nO6hPgI/B3EJ07G/ZcoxunMWSeN3P3zT10dZMEHhcxl+8cSStSXaXj9hfA==} engines: {node: ^12.20.0 || ^14.15.0 || >=16.10.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: @@ -1909,7 +2081,7 @@ packages: '@angular-devkit/architect': 0.1303.9 '@angular-devkit/build-webpack': 0.1303.9(webpack-dev-server@4.7.3)(webpack@5.70.0) '@angular-devkit/core': 13.3.9(chokidar@3.5.3) - '@angular/compiler-cli': 13.3.11(@angular/compiler@13.3.11)(typescript@4.8.4) + '@angular/compiler-cli': 13.3.11(@angular/compiler@13.3.11)(typescript@4.6.4) '@babel/core': 7.16.12 '@babel/generator': 7.16.8 '@babel/helper-annotate-as-pure': 7.16.7 @@ -1920,7 +2092,7 @@ packages: '@babel/runtime': 7.16.7 '@babel/template': 7.16.7 '@discoveryjs/json-ext': 0.5.6 - '@ngtools/webpack': 13.3.9(@angular/compiler-cli@13.3.11)(typescript@4.8.4)(webpack@5.70.0) + '@ngtools/webpack': 13.3.9(@angular/compiler-cli@13.3.11)(typescript@4.6.4)(webpack@5.70.0) ansi-colors: 4.1.1 babel-loader: 8.2.5(@babel/core@7.16.12)(webpack@5.70.0) babel-plugin-istanbul: 6.1.1 @@ -1967,7 +2139,7 @@ packages: text-table: 0.2.0 tree-kill: 1.2.2 tslib: 2.3.1 - typescript: 4.8.4 + typescript: 4.6.4 webpack: 5.70.0(esbuild@0.14.22) webpack-dev-middleware: 5.3.0(webpack@5.70.0) webpack-dev-server: 4.7.3(webpack@5.70.0) @@ -2088,7 +2260,7 @@ packages: - chokidar dev: true - /@angular-eslint/builder@13.5.0(eslint@8.33.0)(typescript@4.8.4): + /@angular-eslint/builder@13.5.0(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-IYY/HYS4fSddJLs2pAkMkKhHL07driUILPxGnGLblfWuoJBhRspyrVL3uZc3Q4iJXc1RJfaOno9oRw11FGyL6Q==} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -2096,7 +2268,7 @@ packages: dependencies: '@nrwl/devkit': 13.1.3 eslint: 8.33.0 - typescript: 4.8.4 + typescript: 4.6.4 transitivePeerDependencies: - '@swc-node/register' - '@swc/core' @@ -2107,43 +2279,43 @@ packages: resolution: {integrity: sha512-7M/5ilxqPD3ydgqqdLsYs3kBwZgNg2Y6C01B5SEHZNLqLT9kAJa7I4y6GlxCZqejCIh554kdXGeV3abIxFccSg==} dev: true - /@angular-eslint/eslint-plugin-template@13.5.0(eslint@8.33.0)(typescript@4.8.4): + /@angular-eslint/eslint-plugin-template@13.5.0(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-ZVSXayn8MqYOhYomH2Cjc0azhuUQbY9fp9dKjJZOD64KhP8BYHw8+Ogc9E/FU5oZQ9fKw6A+23NAYKmLNqSAgA==} peerDependencies: eslint: ^7.0.0 || ^8.0.0 typescript: '*' dependencies: '@angular-eslint/bundled-angular-compiler': 13.5.0 - '@typescript-eslint/experimental-utils': 5.27.1(eslint@8.33.0)(typescript@4.8.4) + '@typescript-eslint/experimental-utils': 5.27.1(eslint@8.33.0)(typescript@4.6.4) aria-query: 4.2.2 axobject-query: 2.2.0 eslint: 8.33.0 - typescript: 4.8.4 + typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@angular-eslint/eslint-plugin@13.5.0(eslint@8.33.0)(typescript@4.8.4): + /@angular-eslint/eslint-plugin@13.5.0(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-k9o9WIqUkdO8tdYFCJ54PUWsNd9HHflih/GmA13EWciBYx8QxciwBh0u4NSAnbtOwp4Y7juGZ/Dta5ZrT/2VBA==} peerDependencies: eslint: ^7.0.0 || ^8.0.0 typescript: '*' dependencies: - '@angular-eslint/utils': 13.5.0(eslint@8.33.0)(typescript@4.8.4) - '@typescript-eslint/experimental-utils': 5.27.1(eslint@8.33.0)(typescript@4.8.4) + '@angular-eslint/utils': 13.5.0(eslint@8.33.0)(typescript@4.6.4) + '@typescript-eslint/experimental-utils': 5.27.1(eslint@8.33.0)(typescript@4.6.4) eslint: 8.33.0 - typescript: 4.8.4 + typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@angular-eslint/schematics@13.5.0(@angular/cli@13.3.9)(eslint@8.33.0)(typescript@4.8.4): + /@angular-eslint/schematics@13.5.0(@angular/cli@13.3.9)(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-0LvdalNpYb0oWwptwkeK2PVokfQ9itMIp8/aMjbOLH1RQ3eHFZgBtVvVm3G5EpPKzbL0llaeTifZvH2z70qVYQ==} peerDependencies: '@angular/cli': '>= 13.0.0 < 14.0.0' dependencies: - '@angular-eslint/eslint-plugin': 13.5.0(eslint@8.33.0)(typescript@4.8.4) - '@angular-eslint/eslint-plugin-template': 13.5.0(eslint@8.33.0)(typescript@4.8.4) + '@angular-eslint/eslint-plugin': 13.5.0(eslint@8.33.0)(typescript@4.6.4) + '@angular-eslint/eslint-plugin-template': 13.5.0(eslint@8.33.0)(typescript@4.6.4) '@angular/cli': 13.3.9 ignore: 5.2.0 strip-json-comments: 3.1.1 @@ -2154,7 +2326,7 @@ packages: - typescript dev: true - /@angular-eslint/template-parser@13.5.0(eslint@8.33.0)(typescript@4.8.4): + /@angular-eslint/template-parser@13.5.0(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-k+24+kBjaOuthfp9RBQB0zH6UqeizZuFQFEuZEQbvirPbdQ2SqNBw7IcmW2Qw1v7fjFe6/6gqK7wm2g7o9ZZvA==} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -2163,19 +2335,19 @@ packages: '@angular-eslint/bundled-angular-compiler': 13.5.0 eslint: 8.33.0 eslint-scope: 5.1.1 - typescript: 4.8.4 + typescript: 4.6.4 dev: true - /@angular-eslint/utils@13.5.0(eslint@8.33.0)(typescript@4.8.4): + /@angular-eslint/utils@13.5.0(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-wX3W6STSDJDJ7ZyEsUdBp4HUPwmillMmKcdnFsy+qxbpJFzFOxOFpK1zet4ELsq1XpB89i9vRvC3vYbpHn3CSw==} peerDependencies: eslint: ^7.0.0 || ^8.0.0 typescript: '*' dependencies: '@angular-eslint/bundled-angular-compiler': 13.5.0 - '@typescript-eslint/experimental-utils': 5.27.1(eslint@8.33.0)(typescript@4.8.4) + '@typescript-eslint/experimental-utils': 5.27.1(eslint@8.33.0)(typescript@4.6.4) eslint: 8.33.0 - typescript: 4.8.4 + typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true @@ -2248,7 +2420,7 @@ packages: tslib: 2.4.1 dev: false - /@angular/compiler-cli@13.3.11(@angular/compiler@13.3.11)(typescript@4.8.4): + /@angular/compiler-cli@13.3.11(@angular/compiler@13.3.11)(typescript@4.6.4): resolution: {integrity: sha512-cl+3Wzxt8NRi2WY+RdsxuQ3yQRUp8pSlfSlJJnfaKE1BEqap6uem2DovuhnIbmrLhxZ5xt7o+I1szyO6sn6+ag==} engines: {node: ^12.20.0 || ^14.15.0 || >=16.10.0} hasBin: true @@ -2266,7 +2438,7 @@ packages: semver: 7.3.8 sourcemap-codec: 1.4.8 tslib: 2.4.1 - typescript: 4.8.4 + typescript: 4.6.4 yargs: 17.7.1 transitivePeerDependencies: - supports-color @@ -4934,7 +5106,7 @@ packages: dependencies: ansi-colors: 4.1.3 fancy-log: 1.3.3 - typescript: 4.8.4 + typescript: 4.9.5 dev: true /@compodoc/ngd-transformer@2.1.0: @@ -5077,6 +5249,15 @@ packages: comment-parser: 1.3.1 esquery: 1.5.0 jsdoc-type-pratt-parser: 3.1.0 + dev: true + + /@es-joy/jsdoccomment@0.39.4: + resolution: {integrity: sha512-Jvw915fjqQct445+yron7Dufix9A+m9j1fCJYlCo1FWlRvTxa3pjJelxdSTdaLWcTwRU6vbL+NYjO4YuNIS5Qg==} + engines: {node: '>=16'} + dependencies: + comment-parser: 1.3.1 + esquery: 1.5.0 + jsdoc-type-pratt-parser: 4.0.0 /@esbuild/android-arm64@0.17.12: resolution: {integrity: sha512-WQ9p5oiXXYJ33F2EkE3r0FRDFVpEdcDiwNX3u7Xaibxfx6vQE0Sb8ytrfQsA5WO6kDn6mDfKLh6KrPBjvkk7xA==} @@ -5283,7 +5464,30 @@ packages: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: eslint: 8.33.0 - eslint-visitor-keys: 3.3.0 + eslint-visitor-keys: 3.4.1 + dev: true + + /@eslint-community/eslint-utils@4.2.0(eslint@8.41.0): + resolution: {integrity: sha512-gB8T4H4DEfX2IV9zGDJPOBgP1e/DbfCPDTtEqUMckpvzS1OYtva8JdFYBqMwYk7xAQ429WGF/UPqn8uQ//h2vQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.41.0 + eslint-visitor-keys: 3.4.1 + + /@eslint-community/eslint-utils@4.4.0(eslint@8.41.0): + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.41.0 + eslint-visitor-keys: 3.4.1 + + /@eslint-community/regexpp@4.5.1: + resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} /@eslint/eslintrc@1.4.1: resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==} @@ -5291,7 +5495,7 @@ packages: dependencies: ajv: 6.12.6 debug: 4.3.4(supports-color@5.5.0) - espree: 9.5.0 + espree: 9.5.2 globals: 13.20.0 ignore: 5.2.4 import-fresh: 3.3.0 @@ -5300,6 +5504,27 @@ packages: strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color + dev: true + + /@eslint/eslintrc@2.0.3: + resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4(supports-color@5.5.0) + espree: 9.5.2 + globals: 13.20.0 + ignore: 5.2.4 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + /@eslint/js@8.41.0: + resolution: {integrity: sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} /@exodus/schemasafe@1.0.0: resolution: {integrity: sha512-2cyupPIZI69HQxEAPllLXBjQp4njDKkOjYRCYxvMZe3/LY9pp9fBM3Tb1wiFAdP6Emo4v3OEbCLGj6u73Q5KLw==} @@ -5346,13 +5571,13 @@ packages: /@hapi/hoek@9.3.0: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} - dev: false + dev: true /@hapi/topo@5.1.0: resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} dependencies: '@hapi/hoek': 9.3.0 - dev: false + dev: true /@hugotomazi/capacitor-navigation-bar@2.0.0(@capacitor/core@4.6.1): resolution: {integrity: sha512-hebf0ixGPugiZfH6g7HS/hrDzkKmNdJV/pV2jUz5lfoZXFMjE+7aeAr1AqwW6EGNej65WcEP8VUL5YUc3wSCjw==} @@ -5759,10 +5984,6 @@ packages: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 - /@krlwlfrt/async-pool@0.7.0: - resolution: {integrity: sha512-qQp9fJdPuSxhJ0aMWCJ8ZavG67GeB1ZoYfYsIooyipeXTWZ9U67uEm93Udvd6C6v1Wa6mvD8X5PBNTtth1x0LQ==} - dev: false - /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: @@ -5783,7 +6004,7 @@ packages: read-yaml-file: 1.1.0 dev: true - /@ngtools/webpack@13.3.9(@angular/compiler-cli@13.3.11)(typescript@4.8.4)(webpack@5.70.0): + /@ngtools/webpack@13.3.9(@angular/compiler-cli@13.3.11)(typescript@4.6.4)(webpack@5.70.0): resolution: {integrity: sha512-wmgOI5sogAuilwBZJqCHVMjm2uhDxjdSmNLFx7eznwGDa6LjvjuATqCv2dVlftq0Y/5oZFVrg5NpyHt5kfZ8Cg==} engines: {node: ^12.20.0 || ^14.15.0 || >=16.10.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: @@ -5791,8 +6012,8 @@ packages: typescript: '>=4.4.3 <4.7' webpack: ^5.30.0 dependencies: - '@angular/compiler-cli': 13.3.11(@angular/compiler@13.3.11)(typescript@4.8.4) - typescript: 4.8.4 + '@angular/compiler-cli': 13.3.11(@angular/compiler@13.3.11)(typescript@4.6.4) + typescript: 4.6.4 webpack: 5.70.0(esbuild@0.14.22) dev: true @@ -6147,15 +6368,15 @@ packages: resolution: {integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==} dependencies: '@hapi/hoek': 9.3.0 - dev: false + dev: true /@sideway/formula@3.0.1: resolution: {integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==} - dev: false + dev: true /@sideway/pinpoint@2.0.0: resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} - dev: false + dev: true /@sindresorhus/is@0.14.0: resolution: {integrity: sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==} @@ -6364,7 +6585,7 @@ packages: resolution: {integrity: sha512-XhXhBv1R/q2ahF3BM7qT5HLzJNlIL0wbcGyZVjqOTqAybAnsLisd7gy1UCyIqpL+5Iv6XhlSyzjLCnI2sIdbCg==} dependencies: '@types/node': 18.15.3 - dev: false + dev: true /@types/config@3.3.0: resolution: {integrity: sha512-9kZSbl3/X3TVNowLCu5HFQdQmD+4287Om55avknEYkuo6R2dDrsp/EXEHUFvfYeG7m1eJ0WYGj+cbcUIhARJAQ==} @@ -6727,7 +6948,7 @@ packages: /@types/traverse@0.6.32: resolution: {integrity: sha512-RBz2uRZVCXuMg93WD//aTS5B120QlT4lR/gL+935QtGsKHLS6sCtZBaKfWjIfk7ZXv/r8mtGbwjVIee6/3XTow==} - dev: false + dev: true /@types/uuid@8.3.4: resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} @@ -6736,7 +6957,7 @@ packages: resolution: {integrity: sha512-2FFOKCF/YydrMUaqg+fkk49qf0e5rDgwt6aQsMzFQzbS419h2gNOXyiwp/o2yYy27bi/C1z+HgfncryjGzlvgQ==} dependencies: '@types/node': 18.15.3 - dev: false + dev: true /@types/ws@8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} @@ -6752,7 +6973,7 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin@5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@3.8.3): + /@typescript-eslint/eslint-plugin@5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-IhxabIpcf++TBaBa1h7jtOWyon80SXPRLDq0dVz5SLFC/eW6tofkw/O7Ar3lkx5z5U6wzbKDrl2larprp5kk5Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6763,24 +6984,52 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.49.0(eslint@8.33.0)(typescript@3.8.3) + '@typescript-eslint/parser': 5.49.0(eslint@8.33.0)(typescript@4.6.4) '@typescript-eslint/scope-manager': 5.49.0 - '@typescript-eslint/type-utils': 5.49.0(eslint@8.33.0)(typescript@3.8.3) - '@typescript-eslint/utils': 5.49.0(eslint@8.33.0)(typescript@3.8.3) + '@typescript-eslint/type-utils': 5.49.0(eslint@8.33.0)(typescript@4.6.4) + '@typescript-eslint/utils': 5.49.0(eslint@8.33.0)(typescript@4.6.4) debug: 4.3.4(supports-color@5.5.0) eslint: 8.33.0 ignore: 5.2.4 natural-compare-lite: 1.4.0 regexpp: 3.2.0 semver: 7.3.8 + tsutils: 3.21.0(typescript@4.6.4) + typescript: 4.6.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/eslint-plugin@5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@3.8.3): + resolution: {integrity: sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.5.1 + '@typescript-eslint/parser': 5.59.8(eslint@8.41.0)(typescript@3.8.3) + '@typescript-eslint/scope-manager': 5.59.8 + '@typescript-eslint/type-utils': 5.59.8(eslint@8.41.0)(typescript@3.8.3) + '@typescript-eslint/utils': 5.59.8(eslint@8.41.0)(typescript@3.8.3) + debug: 4.3.4(supports-color@5.5.0) + eslint: 8.41.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.4 + natural-compare-lite: 1.4.0 + semver: 7.3.8 tsutils: 3.21.0(typescript@3.8.3) typescript: 3.8.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/eslint-plugin@5.49.0(@typescript-eslint/parser@5.49.0)(eslint@8.33.0)(typescript@4.8.4): - resolution: {integrity: sha512-IhxabIpcf++TBaBa1h7jtOWyon80SXPRLDq0dVz5SLFC/eW6tofkw/O7Ar3lkx5z5U6wzbKDrl2larprp5kk5Q==} + /@typescript-eslint/eslint-plugin@5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.41.0)(typescript@4.9.5): + resolution: {integrity: sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -6790,35 +7039,36 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.49.0(eslint@8.33.0)(typescript@4.8.4) - '@typescript-eslint/scope-manager': 5.49.0 - '@typescript-eslint/type-utils': 5.49.0(eslint@8.33.0)(typescript@4.8.4) - '@typescript-eslint/utils': 5.49.0(eslint@8.33.0)(typescript@4.8.4) + '@eslint-community/regexpp': 4.5.1 + '@typescript-eslint/parser': 5.59.8(eslint@8.41.0)(typescript@4.9.5) + '@typescript-eslint/scope-manager': 5.59.8 + '@typescript-eslint/type-utils': 5.59.8(eslint@8.41.0)(typescript@4.9.5) + '@typescript-eslint/utils': 5.59.8(eslint@8.41.0)(typescript@4.9.5) debug: 4.3.4(supports-color@5.5.0) - eslint: 8.33.0 + eslint: 8.41.0 + grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 - regexpp: 3.2.0 semver: 7.3.8 - tsutils: 3.21.0(typescript@4.8.4) - typescript: 4.8.4 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color - /@typescript-eslint/experimental-utils@5.27.1(eslint@8.33.0)(typescript@4.8.4): + /@typescript-eslint/experimental-utils@5.27.1(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-Vd8uewIixGP93sEnmTRIH6jHZYRQRkGPDPpapACMvitJKX8335VHNyqKTE+mZ+m3E2c5VznTZfSsSsS5IF7vUA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.27.1(eslint@8.33.0)(typescript@4.8.4) + '@typescript-eslint/utils': 5.27.1(eslint@8.33.0)(typescript@4.6.4) eslint: 8.33.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser@5.49.0(eslint@8.33.0)(typescript@3.8.3): + /@typescript-eslint/parser@5.49.0(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-veDlZN9mUhGqU31Qiv2qEp+XrJj5fgZpJ8PW30sHU+j/8/e5ruAhLaVDAeznS7A7i4ucb/s8IozpDtt9NqCkZg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6830,16 +7080,36 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.49.0 '@typescript-eslint/types': 5.49.0 - '@typescript-eslint/typescript-estree': 5.49.0(typescript@3.8.3) + '@typescript-eslint/typescript-estree': 5.49.0(typescript@4.6.4) debug: 4.3.4(supports-color@5.5.0) eslint: 8.33.0 + typescript: 4.6.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser@5.59.8(eslint@8.41.0)(typescript@3.8.3): + resolution: {integrity: sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.59.8 + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/typescript-estree': 5.59.8(typescript@3.8.3) + debug: 4.3.4(supports-color@5.5.0) + eslint: 8.41.0 typescript: 3.8.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@5.49.0(eslint@8.33.0)(typescript@4.8.4): - resolution: {integrity: sha512-veDlZN9mUhGqU31Qiv2qEp+XrJj5fgZpJ8PW30sHU+j/8/e5ruAhLaVDAeznS7A7i4ucb/s8IozpDtt9NqCkZg==} + /@typescript-eslint/parser@5.59.8(eslint@8.41.0)(typescript@4.9.5): + resolution: {integrity: sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -6848,12 +7118,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.49.0 - '@typescript-eslint/types': 5.49.0 - '@typescript-eslint/typescript-estree': 5.49.0(typescript@4.8.4) + '@typescript-eslint/scope-manager': 5.59.8 + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/typescript-estree': 5.59.8(typescript@4.9.5) debug: 4.3.4(supports-color@5.5.0) - eslint: 8.33.0 - typescript: 4.8.4 + eslint: 8.41.0 + typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -6871,8 +7141,16 @@ packages: dependencies: '@typescript-eslint/types': 5.49.0 '@typescript-eslint/visitor-keys': 5.49.0 + dev: true - /@typescript-eslint/type-utils@5.49.0(eslint@8.33.0)(typescript@3.8.3): + /@typescript-eslint/scope-manager@5.59.8: + resolution: {integrity: sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/visitor-keys': 5.59.8 + + /@typescript-eslint/type-utils@5.49.0(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-eUgLTYq0tR0FGU5g1YHm4rt5H/+V2IPVkP0cBmbhRyEmyGe4XvJ2YJ6sYTmONfjmdMqyMLad7SB8GvblbeESZA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6882,18 +7160,38 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.49.0(typescript@3.8.3) - '@typescript-eslint/utils': 5.49.0(eslint@8.33.0)(typescript@3.8.3) + '@typescript-eslint/typescript-estree': 5.49.0(typescript@4.6.4) + '@typescript-eslint/utils': 5.49.0(eslint@8.33.0)(typescript@4.6.4) debug: 4.3.4(supports-color@5.5.0) eslint: 8.33.0 + tsutils: 3.21.0(typescript@4.6.4) + typescript: 4.6.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/type-utils@5.59.8(eslint@8.41.0)(typescript@3.8.3): + resolution: {integrity: sha512-+5M518uEIHFBy3FnyqZUF3BMP+AXnYn4oyH8RF012+e7/msMY98FhGL5SrN29NQ9xDgvqCgYnsOiKp1VjZ/fpA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 5.59.8(typescript@3.8.3) + '@typescript-eslint/utils': 5.59.8(eslint@8.41.0)(typescript@3.8.3) + debug: 4.3.4(supports-color@5.5.0) + eslint: 8.41.0 tsutils: 3.21.0(typescript@3.8.3) typescript: 3.8.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/type-utils@5.49.0(eslint@8.33.0)(typescript@4.8.4): - resolution: {integrity: sha512-eUgLTYq0tR0FGU5g1YHm4rt5H/+V2IPVkP0cBmbhRyEmyGe4XvJ2YJ6sYTmONfjmdMqyMLad7SB8GvblbeESZA==} + /@typescript-eslint/type-utils@5.59.8(eslint@8.41.0)(typescript@4.9.5): + resolution: {integrity: sha512-+5M518uEIHFBy3FnyqZUF3BMP+AXnYn4oyH8RF012+e7/msMY98FhGL5SrN29NQ9xDgvqCgYnsOiKp1VjZ/fpA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -6902,12 +7200,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.49.0(typescript@4.8.4) - '@typescript-eslint/utils': 5.49.0(eslint@8.33.0)(typescript@4.8.4) + '@typescript-eslint/typescript-estree': 5.59.8(typescript@4.9.5) + '@typescript-eslint/utils': 5.59.8(eslint@8.41.0)(typescript@4.9.5) debug: 4.3.4(supports-color@5.5.0) - eslint: 8.33.0 - tsutils: 3.21.0(typescript@4.8.4) - typescript: 4.8.4 + eslint: 8.41.0 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -6919,8 +7217,13 @@ packages: /@typescript-eslint/types@5.49.0: resolution: {integrity: sha512-7If46kusG+sSnEpu0yOz2xFv5nRz158nzEXnJFCGVEHWnuzolXKwrH5Bsf9zsNlOQkyZuk0BZKKoJQI+1JPBBg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true - /@typescript-eslint/typescript-estree@5.27.1(typescript@4.8.4): + /@typescript-eslint/types@5.59.8: + resolution: {integrity: sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + /@typescript-eslint/typescript-estree@5.27.1(typescript@4.6.4): resolution: {integrity: sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6935,13 +7238,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 - tsutils: 3.21.0(typescript@4.8.4) - typescript: 4.8.4 + tsutils: 3.21.0(typescript@4.6.4) + typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@5.49.0(typescript@3.8.3): + /@typescript-eslint/typescript-estree@5.49.0(typescript@4.6.4): resolution: {integrity: sha512-PBdx+V7deZT/3GjNYPVQv1Nc0U46dAHbIuOG8AZ3on3vuEKiPDwFE/lG1snN2eUB9IhF7EyF7K1hmTcLztNIsA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6956,14 +7259,35 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 + tsutils: 3.21.0(typescript@4.6.4) + typescript: 4.6.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/typescript-estree@5.59.8(typescript@3.8.3): + resolution: {integrity: sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/visitor-keys': 5.59.8 + debug: 4.3.4(supports-color@5.5.0) + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.8 tsutils: 3.21.0(typescript@3.8.3) typescript: 3.8.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@5.49.0(typescript@4.8.4): - resolution: {integrity: sha512-PBdx+V7deZT/3GjNYPVQv1Nc0U46dAHbIuOG8AZ3on3vuEKiPDwFE/lG1snN2eUB9IhF7EyF7K1hmTcLztNIsA==} + /@typescript-eslint/typescript-estree@5.59.8(typescript@4.9.5): + resolution: {integrity: sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -6971,18 +7295,18 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.49.0 - '@typescript-eslint/visitor-keys': 5.49.0 + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/visitor-keys': 5.59.8 debug: 4.3.4(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 - tsutils: 3.21.0(typescript@4.8.4) - typescript: 4.8.4 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color - /@typescript-eslint/utils@5.27.1(eslint@8.33.0)(typescript@4.8.4): + /@typescript-eslint/utils@5.27.1(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-mZ9WEn1ZLDaVrhRaYgzbkXBkTPghPFsup8zDbbsYTxC5OmqrFE7skkKS/sraVsLP3TcT3Ki5CSyEFBRkLH/H/w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6991,7 +7315,7 @@ packages: '@types/json-schema': 7.0.11 '@typescript-eslint/scope-manager': 5.27.1 '@typescript-eslint/types': 5.27.1 - '@typescript-eslint/typescript-estree': 5.27.1(typescript@4.8.4) + '@typescript-eslint/typescript-estree': 5.27.1(typescript@4.6.4) eslint: 8.33.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0(eslint@8.33.0) @@ -7000,7 +7324,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@5.49.0(eslint@8.33.0)(typescript@3.8.3): + /@typescript-eslint/utils@5.49.0(eslint@8.33.0)(typescript@4.6.4): resolution: {integrity: sha512-cPJue/4Si25FViIb74sHCLtM4nTSBXtLx1d3/QT6mirQ/c65bV8arBEebBJJizfq8W2YyMoPI/WWPFWitmNqnQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -7010,7 +7334,7 @@ packages: '@types/semver': 7.3.13 '@typescript-eslint/scope-manager': 5.49.0 '@typescript-eslint/types': 5.49.0 - '@typescript-eslint/typescript-estree': 5.49.0(typescript@3.8.3) + '@typescript-eslint/typescript-estree': 5.49.0(typescript@4.6.4) eslint: 8.33.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0(eslint@8.33.0) @@ -7020,20 +7344,40 @@ packages: - typescript dev: true - /@typescript-eslint/utils@5.49.0(eslint@8.33.0)(typescript@4.8.4): - resolution: {integrity: sha512-cPJue/4Si25FViIb74sHCLtM4nTSBXtLx1d3/QT6mirQ/c65bV8arBEebBJJizfq8W2YyMoPI/WWPFWitmNqnQ==} + /@typescript-eslint/utils@5.59.8(eslint@8.41.0)(typescript@3.8.3): + resolution: {integrity: sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.41.0) '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.49.0 - '@typescript-eslint/types': 5.49.0 - '@typescript-eslint/typescript-estree': 5.49.0(typescript@4.8.4) - eslint: 8.33.0 + '@typescript-eslint/scope-manager': 5.59.8 + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/typescript-estree': 5.59.8(typescript@3.8.3) + eslint: 8.41.0 + eslint-scope: 5.1.1 + semver: 7.3.8 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils@5.59.8(eslint@8.41.0)(typescript@4.9.5): + resolution: {integrity: sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.41.0) + '@types/json-schema': 7.0.11 + '@types/semver': 7.3.13 + '@typescript-eslint/scope-manager': 5.59.8 + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/typescript-estree': 5.59.8(typescript@4.9.5) + eslint: 8.41.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0(eslint@8.33.0) semver: 7.3.8 transitivePeerDependencies: - supports-color @@ -7044,7 +7388,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.27.1 - eslint-visitor-keys: 3.3.0 + eslint-visitor-keys: 3.4.1 dev: true /@typescript-eslint/visitor-keys@5.49.0: @@ -7052,7 +7396,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.49.0 - eslint-visitor-keys: 3.3.0 + eslint-visitor-keys: 3.4.1 + dev: true + + /@typescript-eslint/visitor-keys@5.59.8: + resolution: {integrity: sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.59.8 + eslint-visitor-keys: 3.4.1 /@webassemblyjs/ast@1.11.1: resolution: {integrity: sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==} @@ -7513,6 +7865,10 @@ packages: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} dev: true + /are-docs-informative@0.0.2: + resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} + engines: {node: '>=14'} + /are-we-there-yet@3.0.1: resolution: {integrity: sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -7720,7 +8076,7 @@ packages: follow-redirects: 1.15.2 transitivePeerDependencies: - debug - dev: false + dev: true /axios@0.27.2: resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} @@ -8256,7 +8612,6 @@ packages: engines: {node: '>=10.16.0'} dependencies: streamsearch: 1.1.0 - dev: false /bytes@3.0.0: resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} @@ -8656,7 +9011,7 @@ packages: engines: {node: '>=4'} dependencies: string-width: 4.2.3 - dev: false + dev: true /cli-spinners@2.6.1: resolution: {integrity: sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==} @@ -8827,7 +9182,6 @@ packages: /commander@10.0.0: resolution: {integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==} engines: {node: '>=14'} - dev: false /commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} @@ -9563,10 +9917,11 @@ packages: engines: {node: '>= 6'} dev: true - /date-fns@2.29.3: - resolution: {integrity: sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==} + /date-fns@2.30.0: + resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} - dev: false + dependencies: + '@babel/runtime': 7.21.0 /date-format@4.0.14: resolution: {integrity: sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==} @@ -10633,13 +10988,13 @@ packages: source-map: 0.1.43 dev: true - /eslint-config-prettier@8.6.0(eslint@8.33.0): - resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==} + /eslint-config-prettier@8.8.0(eslint@8.41.0): + resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.33.0 + eslint: 8.41.0 /eslint-plugin-jsdoc@39.7.4(eslint@8.33.0): resolution: {integrity: sha512-2eJcWGKRyNQFa37UIpGcAdOp3wtES8vV3mlnFmEmJCuBNyFhK6cMhbZgMkLoLjKnipoxsN9GbfZZ+8nPY8ETZQ==} @@ -10657,8 +11012,27 @@ packages: spdx-expression-parse: 3.0.1 transitivePeerDependencies: - supports-color + dev: true - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.6.0)(eslint@8.33.0)(prettier@2.8.6): + /eslint-plugin-jsdoc@46.1.0(eslint@8.41.0): + resolution: {integrity: sha512-NpjpSuWR+Wwxzmssji7AVty1Vu0JvI7v+cTj+Rw1nKVjGv2eMvLGM/SI4VpgTXp82JbLtFOsA2QYLHT3YSmASA==} + engines: {node: '>=16'} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@es-joy/jsdoccomment': 0.39.4 + are-docs-informative: 0.0.2 + comment-parser: 1.3.1 + debug: 4.3.4(supports-color@5.5.0) + escape-string-regexp: 4.0.0 + eslint: 8.41.0 + esquery: 1.5.0 + semver: 7.5.1 + spdx-expression-parse: 3.0.1 + transitivePeerDependencies: + - supports-color + + /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.6): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -10669,8 +11043,8 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.33.0 - eslint-config-prettier: 8.6.0(eslint@8.33.0) + eslint: 8.41.0 + eslint-config-prettier: 8.8.0(eslint@8.41.0) prettier: 2.8.6 prettier-linter-helpers: 1.0.0 @@ -10697,6 +11071,31 @@ packages: safe-regex: 2.1.1 semver: 7.3.8 strip-indent: 3.0.0 + dev: true + + /eslint-plugin-unicorn@47.0.0(eslint@8.41.0): + resolution: {integrity: sha512-ivB3bKk7fDIeWOUmmMm9o3Ax9zbMz1Bsza/R2qm46ufw4T6VBFBaJIR1uN3pCKSmSXm8/9Nri8V+iUut1NhQGA==} + engines: {node: '>=16'} + peerDependencies: + eslint: '>=8.38.0' + dependencies: + '@babel/helper-validator-identifier': 7.19.1 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.41.0) + ci-info: 3.8.0 + clean-regexp: 1.0.0 + eslint: 8.41.0 + esquery: 1.5.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.1 + jsesc: 3.0.2 + lodash: 4.17.21 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.24 + regjsparser: 0.10.0 + safe-regex: 2.1.1 + semver: 7.3.8 + strip-indent: 3.0.0 /eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} @@ -10711,6 +11110,14 @@ packages: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 + dev: true + + /eslint-scope@7.2.0: + resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 /eslint-utils@3.0.0(eslint@8.33.0): resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} @@ -10720,14 +11127,21 @@ packages: dependencies: eslint: 8.33.0 eslint-visitor-keys: 2.1.0 + dev: true /eslint-visitor-keys@2.1.0: resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} engines: {node: '>=10'} + dev: true /eslint-visitor-keys@3.3.0: resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint-visitor-keys@3.4.1: + resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} /eslint@8.33.0: resolution: {integrity: sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==} @@ -10775,6 +11189,54 @@ packages: text-table: 0.2.0 transitivePeerDependencies: - supports-color + dev: true + + /eslint@8.41.0: + resolution: {integrity: sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint-community/eslint-utils': 4.2.0(eslint@8.41.0) + '@eslint-community/regexpp': 4.5.1 + '@eslint/eslintrc': 2.0.3 + '@eslint/js': 8.41.0 + '@humanwhocodes/config-array': 0.11.8 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4(supports-color@5.5.0) + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.0 + eslint-visitor-keys: 3.4.1 + espree: 9.5.2 + esquery: 1.5.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.20.0 + graphemer: 1.4.0 + ignore: 5.2.4 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.1 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color /esmock@2.2.3: resolution: {integrity: sha512-nqXoU3Z/ogsPKhXoX41PDs4rCtJxMcwEI8vw4NSjE7b6Os0EzPJvmA15X6F74AIt1Fu8VBRvLl3HDxXNze/0eg==} @@ -10787,7 +11249,16 @@ packages: dependencies: acorn: 8.8.2 acorn-jsx: 5.3.2(acorn@8.8.2) - eslint-visitor-keys: 3.3.0 + eslint-visitor-keys: 3.4.1 + dev: true + + /espree@9.5.2: + resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.8.2 + acorn-jsx: 5.3.2(acorn@8.8.2) + eslint-visitor-keys: 3.4.1 /esprima@1.0.4: resolution: {integrity: sha512-rp5dMKN8zEs9dfi9g0X1ClLmV//WRyk/R15mppFNICIFRG5P92VP7Z04p8pk++gABo9W2tY+kHyu6P1mEHgmTA==} @@ -11816,6 +12287,9 @@ packages: /grapheme-splitter@1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + /graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + /guid-typescript@1.0.9: resolution: {integrity: sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ==} dev: false @@ -12962,7 +13436,7 @@ packages: '@sideway/address': 4.1.4 '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 - dev: false + dev: true /joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} @@ -12976,6 +13450,7 @@ packages: /js-sdsl@4.3.0: resolution: {integrity: sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==} + dev: true /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -13001,6 +13476,11 @@ packages: /jsdoc-type-pratt-parser@3.1.0: resolution: {integrity: sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==} engines: {node: '>=12.0.0'} + dev: true + + /jsdoc-type-pratt-parser@4.0.0: + resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} + engines: {node: '>=12.0.0'} /jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} @@ -15730,7 +16210,7 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - ts-node: 10.9.1(@types/node@18.15.3)(typescript@4.8.4) + ts-node: 10.9.1(@types/node@18.15.3)(typescript@4.9.5) yaml: 1.10.2 dev: true @@ -16618,6 +17098,7 @@ packages: /regexpp@3.2.0: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} engines: {node: '>=8'} + dev: true /regexpu-core@5.3.2: resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} @@ -16645,11 +17126,18 @@ packages: rc: 1.2.8 dev: true + /regjsparser@0.10.0: + resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} + hasBin: true + dependencies: + jsesc: 0.5.0 + /regjsparser@0.9.1: resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} hasBin: true dependencies: jsesc: 0.5.0 + dev: true /request-progress@3.0.0: resolution: {integrity: sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==} @@ -17065,6 +17553,13 @@ packages: lru-cache: 6.0.0 dev: true + /semver@7.5.1: + resolution: {integrity: sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + /send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} @@ -17781,7 +18276,6 @@ packages: /streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} - dev: false /string-similarity@4.0.4: resolution: {integrity: sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==} @@ -18471,6 +18965,7 @@ packages: /traverse@0.6.7: resolution: {integrity: sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==} + dev: true /tree-kill@1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} @@ -18543,7 +19038,7 @@ packages: yn: 3.1.1 dev: true - /ts-node@10.9.1(@types/node@18.15.3)(typescript@4.8.4): + /ts-node@10.9.1(@types/node@18.15.3)(typescript@4.6.4): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -18569,7 +19064,38 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.8.4 + typescript: 4.6.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + + /ts-node@10.9.1(@types/node@18.15.3)(typescript@4.9.5): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.3 + '@types/node': 18.15.3 + acorn: 8.8.2 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.9.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -18596,7 +19122,7 @@ packages: /tslib@2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} - /tsup@6.7.0(ts-node@10.9.1)(typescript@4.8.4): + /tsup@6.7.0(ts-node@10.9.1)(typescript@4.9.5): resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==} engines: {node: '>=14.18'} hasBin: true @@ -18626,7 +19152,7 @@ packages: source-map: 0.8.0-beta.0 sucrase: 3.30.0 tree-kill: 1.2.2 - typescript: 4.8.4 + typescript: 4.9.5 transitivePeerDependencies: - supports-color - ts-node @@ -18642,14 +19168,24 @@ packages: typescript: 3.8.3 dev: true - /tsutils@3.21.0(typescript@4.8.4): + /tsutils@3.21.0(typescript@4.6.4): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.8.4 + typescript: 4.6.4 + dev: true + + /tsutils@3.21.0(typescript@4.9.5): + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 4.9.5 /tty-browserify@0.0.0: resolution: {integrity: sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==} @@ -18848,7 +19384,7 @@ packages: typescript: 3.8.3 dev: false - /typedoc@0.24.7(typescript@4.8.4): + /typedoc@0.24.7(typescript@4.9.5): resolution: {integrity: sha512-zzfKDFIZADA+XRIp2rMzLe9xZ6pt12yQOhCr7cD7/PBTjhPmMyMvGrkZ2lPNJitg3Hj1SeiYFNzCsSDrlpxpKw==} engines: {node: '>= 14.14'} hasBin: true @@ -18859,7 +19395,7 @@ packages: marked: 4.3.0 minimatch: 9.0.1 shiki: 0.14.1 - typescript: 4.8.4 + typescript: 4.9.5 dev: true /typescript@3.8.3: @@ -18867,16 +19403,16 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - /typescript@4.8.4: - resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + /typescript@4.6.4: + resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==} engines: {node: '>=4.2.0'} hasBin: true + dev: true /typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true - dev: false /ua-parser-js@0.7.34: resolution: {integrity: sha512-cJMeh/eOILyGu0ejgTKB95yKT3zOenSe9UGE3vj6WfiOwgGYnmATUsnDixMFvdU+rNMvWih83hrUP8VwhF9yXQ==} @@ -18903,7 +19439,6 @@ packages: engines: {node: '>=14.0'} dependencies: busboy: 1.6.0 - dev: false /unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} @@ -19174,7 +19709,7 @@ packages: rxjs: 7.8.0 transitivePeerDependencies: - debug - dev: false + dev: true /watchpack@2.4.0: resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==}