From 09a9c0d9bc8ec5165913c4c5b4c62968518fcd48 Mon Sep 17 00:00:00 2001 From: Gallay Date: Wed, 15 Oct 2025 17:21:51 +0200 Subject: [PATCH 1/4] feat: stub --- .yarn/versions/2d4efe43.yml | 5 - .yarn/versions/544e081e.yml | 5 - .yarn/versions/bf3e3cf4.yml | 5 - .yarn/versions/cee96777.yml | 5 - .yarn/versions/e54633dc.yml | 5 - README.md | 4 +- common/schemas/authentication-api.json | 246 ++++++++++ common/schemas/boilerplate-api.json | 436 ------------------ common/schemas/entities.json | 7 +- common/src/authentication-api.ts | 13 + common/src/bin/create-schemas.ts | 4 +- common/src/boilerplate-api.ts | 20 - common/src/index.ts | 2 +- frontend/index.html | 2 +- frontend/src/components/layout.tsx | 2 +- frontend/src/environment-options.ts | 2 +- ...client.ts => authentication-api-client.ts} | 8 +- frontend/src/services/session.ts | 6 +- package.json | 8 +- service/src/service.ts | 23 +- yarn.lock | 50 +- 21 files changed, 312 insertions(+), 546 deletions(-) delete mode 100644 .yarn/versions/2d4efe43.yml delete mode 100644 .yarn/versions/544e081e.yml delete mode 100644 .yarn/versions/bf3e3cf4.yml delete mode 100644 .yarn/versions/cee96777.yml delete mode 100644 .yarn/versions/e54633dc.yml create mode 100644 common/schemas/authentication-api.json delete mode 100644 common/schemas/boilerplate-api.json create mode 100644 common/src/authentication-api.ts delete mode 100644 common/src/boilerplate-api.ts rename frontend/src/services/{boilerplate-api-client.ts => authentication-api-client.ts} (71%) diff --git a/.yarn/versions/2d4efe43.yml b/.yarn/versions/2d4efe43.yml deleted file mode 100644 index 6e6773b..0000000 --- a/.yarn/versions/2d4efe43.yml +++ /dev/null @@ -1,5 +0,0 @@ -releases: - common: patch - frontend: patch - furystack-boilerplate-app: patch - service: patch diff --git a/.yarn/versions/544e081e.yml b/.yarn/versions/544e081e.yml deleted file mode 100644 index 6e6773b..0000000 --- a/.yarn/versions/544e081e.yml +++ /dev/null @@ -1,5 +0,0 @@ -releases: - common: patch - frontend: patch - furystack-boilerplate-app: patch - service: patch diff --git a/.yarn/versions/bf3e3cf4.yml b/.yarn/versions/bf3e3cf4.yml deleted file mode 100644 index 6e6773b..0000000 --- a/.yarn/versions/bf3e3cf4.yml +++ /dev/null @@ -1,5 +0,0 @@ -releases: - common: patch - frontend: patch - furystack-boilerplate-app: patch - service: patch diff --git a/.yarn/versions/cee96777.yml b/.yarn/versions/cee96777.yml deleted file mode 100644 index 6e6773b..0000000 --- a/.yarn/versions/cee96777.yml +++ /dev/null @@ -1,5 +0,0 @@ -releases: - common: patch - frontend: patch - furystack-boilerplate-app: patch - service: patch diff --git a/.yarn/versions/e54633dc.yml b/.yarn/versions/e54633dc.yml deleted file mode 100644 index 6e6773b..0000000 --- a/.yarn/versions/e54633dc.yml +++ /dev/null @@ -1,5 +0,0 @@ -releases: - common: patch - frontend: patch - furystack-boilerplate-app: patch - service: patch diff --git a/README.md b/README.md index 68490d1..080e410 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# boilerplate +# obsidian-core -Boilerplate app with common type api definitions, a furystack-based backend service and a Shades-based single page application. +Obsidian Core is an advanced smart home management system built with Furystack. It provides a robust backend service and a user-friendly frontend interface to control and monitor your smart home devices. # Usage diff --git a/common/schemas/authentication-api.json b/common/schemas/authentication-api.json new file mode 100644 index 0000000..d199868 --- /dev/null +++ b/common/schemas/authentication-api.json @@ -0,0 +1,246 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$ref": "#/definitions/AuthenticationApi", + "definitions": { + "AuthenticationApi": { + "type": "object", + "properties": { + "GET": { + "type": "object", + "properties": { + "/isAuthenticated": { + "type": "object", + "properties": { + "result": { + "type": "object", + "properties": { + "isAuthenticated": { + "type": "boolean" + } + }, + "required": [ + "isAuthenticated" + ], + "additionalProperties": false + } + }, + "required": [ + "result" + ], + "additionalProperties": false + }, + "/currentUser": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/User" + } + }, + "required": [ + "result" + ], + "additionalProperties": false + } + }, + "required": [ + "/isAuthenticated", + "/currentUser" + ], + "additionalProperties": false + }, + "POST": { + "type": "object", + "properties": { + "/login": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/User" + }, + "body": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "password" + ], + "additionalProperties": false + } + }, + "required": [ + "result", + "body" + ], + "additionalProperties": false + }, + "/logout": { + "type": "object", + "properties": { + "result": {} + }, + "required": [ + "result" + ], + "additionalProperties": false + } + }, + "required": [ + "/login", + "/logout" + ], + "additionalProperties": false + }, + "PATCH": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "result": {}, + "url": {}, + "query": {}, + "body": {}, + "headers": {} + }, + "required": [ + "result" + ], + "additionalProperties": false + } + }, + "PUT": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "result": {}, + "url": {}, + "query": {}, + "body": {}, + "headers": {} + }, + "required": [ + "result" + ], + "additionalProperties": false + } + }, + "DELETE": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "result": {}, + "url": {}, + "query": {}, + "body": {}, + "headers": {} + }, + "required": [ + "result" + ], + "additionalProperties": false + } + }, + "HEAD": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "result": {}, + "url": {}, + "query": {}, + "body": {}, + "headers": {} + }, + "required": [ + "result" + ], + "additionalProperties": false + } + }, + "CONNECT": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "result": {}, + "url": {}, + "query": {}, + "body": {}, + "headers": {} + }, + "required": [ + "result" + ], + "additionalProperties": false + } + }, + "TRACE": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "result": {}, + "url": {}, + "query": {}, + "body": {}, + "headers": {} + }, + "required": [ + "result" + ], + "additionalProperties": false + } + }, + "OPTIONS": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "result": {}, + "url": {}, + "query": {}, + "body": {}, + "headers": {} + }, + "required": [ + "result" + ], + "additionalProperties": false + } + } + }, + "required": [ + "GET", + "POST" + ], + "additionalProperties": false + }, + "User": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "username", + "roles" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/common/schemas/boilerplate-api.json b/common/schemas/boilerplate-api.json deleted file mode 100644 index 9e239dc..0000000 --- a/common/schemas/boilerplate-api.json +++ /dev/null @@ -1,436 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "TestQueryEndpoint": { - "type": "object", - "properties": { - "query": { - "type": "object", - "properties": { - "param1": { - "type": "string" - } - }, - "required": ["param1"], - "additionalProperties": false - }, - "result": { - "type": "object", - "properties": { - "param1Value": { - "type": "string" - } - }, - "required": ["param1Value"], - "additionalProperties": false - } - }, - "required": ["query", "result"], - "additionalProperties": false - }, - "TestUrlParamsEndpoint": { - "type": "object", - "properties": { - "url": { - "type": "object", - "properties": { - "urlParam": { - "type": "string" - } - }, - "required": ["urlParam"], - "additionalProperties": false - }, - "result": { - "type": "object", - "properties": { - "urlParamValue": { - "type": "string" - } - }, - "required": ["urlParamValue"], - "additionalProperties": false - } - }, - "required": ["url", "result"], - "additionalProperties": false - }, - "TestPostBodyEndpoint": { - "type": "object", - "properties": { - "body": { - "type": "object", - "properties": { - "value": { - "type": "string" - } - }, - "required": ["value"], - "additionalProperties": false - }, - "result": { - "type": "object", - "properties": { - "bodyValue": { - "type": "string" - } - }, - "required": ["bodyValue"], - "additionalProperties": false - } - }, - "required": ["body", "result"], - "additionalProperties": false - }, - "BoilerplateApi": { - "type": "object", - "properties": { - "GET": { - "type": "object", - "properties": { - "/isAuthenticated": { - "type": "object", - "properties": { - "result": { - "type": "object", - "properties": { - "isAuthenticated": { - "type": "boolean" - } - }, - "required": ["isAuthenticated"], - "additionalProperties": false - } - }, - "required": ["result"], - "additionalProperties": false - }, - "/currentUser": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/User" - } - }, - "required": ["result"], - "additionalProperties": false - }, - "/testQuery": { - "$ref": "#/definitions/TestQueryEndpoint" - }, - "/testUrlParams/:urlParam": { - "$ref": "#/definitions/TestUrlParamsEndpoint" - } - }, - "required": ["/isAuthenticated", "/currentUser", "/testQuery", "/testUrlParams/:urlParam"], - "additionalProperties": false - }, - "POST": { - "type": "object", - "properties": { - "/login": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/User" - }, - "body": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "required": ["username", "password"], - "additionalProperties": false - } - }, - "required": ["result", "body"], - "additionalProperties": false - }, - "/logout": { - "type": "object", - "properties": { - "result": {} - }, - "required": ["result"], - "additionalProperties": false - }, - "/testPostBody": { - "$ref": "#/definitions/TestPostBodyEndpoint" - } - }, - "required": ["/login", "/logout", "/testPostBody"], - "additionalProperties": false - }, - "PATCH": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "PUT": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "DELETE": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "HEAD": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "CONNECT": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "TRACE": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "OPTIONS": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - } - }, - "required": ["GET", "POST"], - "additionalProperties": false - }, - "RestApi": { - "type": "object", - "properties": { - "GET": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "POST": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "PATCH": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "PUT": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "DELETE": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "HEAD": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "CONNECT": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "TRACE": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - }, - "OPTIONS": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "result": {}, - "url": {}, - "query": {}, - "body": {}, - "headers": {} - }, - "required": ["result"], - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "User": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["username", "roles"], - "additionalProperties": false - } - } -} diff --git a/common/schemas/entities.json b/common/schemas/entities.json index ec29351..aa27afc 100644 --- a/common/schemas/entities.json +++ b/common/schemas/entities.json @@ -15,8 +15,11 @@ } } }, - "required": ["username", "roles"], + "required": [ + "username", + "roles" + ], "additionalProperties": false } } -} +} \ No newline at end of file diff --git a/common/src/authentication-api.ts b/common/src/authentication-api.ts new file mode 100644 index 0000000..11f8293 --- /dev/null +++ b/common/src/authentication-api.ts @@ -0,0 +1,13 @@ +import type { RestApi } from '@furystack/rest' +import type { User } from './models/index.js' + +export interface AuthenticationApi extends RestApi { + GET: { + '/isAuthenticated': { result: { isAuthenticated: boolean } } + '/currentUser': { result: User } + } + POST: { + '/login': { result: User; body: { username: string; password: string } } + '/logout': { result: unknown } + } +} diff --git a/common/src/bin/create-schemas.ts b/common/src/bin/create-schemas.ts index 19556ad..aa465e3 100644 --- a/common/src/bin/create-schemas.ts +++ b/common/src/bin/create-schemas.ts @@ -21,8 +21,8 @@ export const entityValues: SchemaGenerationSetting[] = [ export const apiValues: SchemaGenerationSetting[] = [ { - inputFile: './src/boilerplate-api.ts', - outputFile: './schemas/boilerplate-api.json', + inputFile: './src/authentication-api.ts', + outputFile: './schemas/authentication-api.json', type: '*', }, ] diff --git a/common/src/boilerplate-api.ts b/common/src/boilerplate-api.ts deleted file mode 100644 index ff2299b..0000000 --- a/common/src/boilerplate-api.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { RestApi } from '@furystack/rest' -import type { User } from './models/index.js' - -export type TestQueryEndpoint = { query: { param1: string }; result: { param1Value: string } } -export type TestUrlParamsEndpoint = { url: { urlParam: string }; result: { urlParamValue: string } } -export type TestPostBodyEndpoint = { body: { value: string }; result: { bodyValue: string } } - -export interface BoilerplateApi extends RestApi { - GET: { - '/isAuthenticated': { result: { isAuthenticated: boolean } } - '/currentUser': { result: User } - '/testQuery': TestQueryEndpoint - '/testUrlParams/:urlParam': TestUrlParamsEndpoint - } - POST: { - '/login': { result: User; body: { username: string; password: string } } - '/logout': { result: unknown } - '/testPostBody': TestPostBodyEndpoint - } -} diff --git a/common/src/index.ts b/common/src/index.ts index c6bf005..b4d6ed2 100644 --- a/common/src/index.ts +++ b/common/src/index.ts @@ -1,2 +1,2 @@ +export * from './authentication-api.js' export * from './models/index.js' -export * from './boilerplate-api.js' diff --git a/frontend/index.html b/frontend/index.html index 1a0137a..4894646 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2,7 +2,7 @@ - FuryStack Boilerplate App + The Obsidian Core diff --git a/frontend/src/components/layout.tsx b/frontend/src/components/layout.tsx index bd5fce1..f33ffbb 100644 --- a/frontend/src/components/layout.tsx +++ b/frontend/src/components/layout.tsx @@ -24,7 +24,7 @@ export const Layout = Shade({ backgroundColor: injector.getInstance(ThemeProviderService).theme.background.default, }} > -
+
) diff --git a/frontend/src/environment-options.ts b/frontend/src/environment-options.ts index 609206b..82a8470 100644 --- a/frontend/src/environment-options.ts +++ b/frontend/src/environment-options.ts @@ -4,6 +4,6 @@ export const environmentOptions = { // appVersion: process.env.APP_VERSION as string, // buildDate: new Date(process.env.BUILD_DATE as string), // serviceUrl: process.env.SERVICE_URL as string, - repository: 'http://github.com/furystack/boilerplate', + repository: 'http://github.com/furystack/obsidian-core', serviceUrl: 'http://localhost:9090/api', //process.env.REPOSITORY as string, } diff --git a/frontend/src/services/boilerplate-api-client.ts b/frontend/src/services/authentication-api-client.ts similarity index 71% rename from frontend/src/services/boilerplate-api-client.ts rename to frontend/src/services/authentication-api-client.ts index 48cf811..7d292f7 100644 --- a/frontend/src/services/boilerplate-api-client.ts +++ b/frontend/src/services/authentication-api-client.ts @@ -1,11 +1,11 @@ -import { createClient } from '@furystack/rest-client-fetch' -import type { BoilerplateApi } from 'common' import { Injectable } from '@furystack/inject' +import { createClient } from '@furystack/rest-client-fetch' +import type { AuthenticationApi } from 'common' import { environmentOptions } from '../environment-options.js' @Injectable({ lifetime: 'singleton' }) -export class BoilerplateApiClient { - public call = createClient({ +export class AuthenticationApiClient { + public call = createClient({ endpointUrl: environmentOptions.serviceUrl, requestInit: { credentials: 'include', diff --git a/frontend/src/services/session.ts b/frontend/src/services/session.ts index 7b894b4..ef583ef 100644 --- a/frontend/src/services/session.ts +++ b/frontend/src/services/session.ts @@ -3,7 +3,7 @@ import { Injectable, Injected } from '@furystack/inject' import { NotyService } from '@furystack/shades-common-components' import { ObservableValue, usingAsync } from '@furystack/utils' import type { User } from 'common' -import { BoilerplateApiClient } from './boilerplate-api-client.js' +import { AuthenticationApiClient } from './authentication-api-client.js' export type SessionState = 'initializing' | 'offline' | 'unauthenticated' | 'authenticated' @@ -101,8 +101,8 @@ export class SessionService implements IdentityContext { return currentUser as unknown as TUser } - @Injected(BoilerplateApiClient) - declare private api: BoilerplateApiClient + @Injected(AuthenticationApiClient) + declare private api: AuthenticationApiClient @Injected(NotyService) declare private readonly notys: NotyService diff --git a/package.json b/package.json index bec3bc9..a802759 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "furystack-boilerplate-app", - "version": "1.0.2", - "description": "example web app based on furystack", + "name": "obsidian-core", + "version": "0.0.1", + "description": "", "main": "service/src/index.ts", - "repository": "https://github.com/furystack/boilerplate.git", + "repository": "https://github.com/furystack/obsidian-cpre.git", "author": "Gallay Lajos ", "license": "GPL-2.0-only", "private": true, diff --git a/service/src/service.ts b/service/src/service.ts index 0f0aed5..e005aac 100644 --- a/service/src/service.ts +++ b/service/src/service.ts @@ -1,14 +1,11 @@ -import type { BoilerplateApi } from 'common' -import BoilerplateApiSchemas from 'common/schemas/boilerplate-api.json' with { type: 'json' } +import type { AuthenticationApi } from 'common' import { DefaultSession, GetCurrentUser, IsAuthenticated, - JsonResult, LoginAction, LogoutAction, - Validate, useHttpAuthentication, useRestService, useStaticFiles, @@ -23,13 +20,13 @@ useHttpAuthentication(injector, { getUserStore: (sm) => sm.getStoreFor(User, 'username'), getSessionStore: (sm) => sm.getStoreFor(DefaultSession, 'sessionId'), }) -useRestService({ +useRestService({ injector, root: 'api', port, - name: 'Boilerplate Service', + name: 'Authentication Service', version: '1.0.0', - description: 'API for Furystack Boilerplate Application containing simple authentication and example endpoints', + description: 'API for Furystack Authentication Service containing authentication related endpoints', cors: { credentials: true, origins: ['http://localhost:8080'], @@ -39,22 +36,10 @@ useRestService({ GET: { '/currentUser': GetCurrentUser, '/isAuthenticated': IsAuthenticated, - '/testQuery': Validate({ schema: BoilerplateApiSchemas, schemaName: 'TestQueryEndpoint' })(async (options) => - JsonResult({ param1Value: options.getQuery().param1 }), - ), - '/testUrlParams/:urlParam': Validate({ schema: BoilerplateApiSchemas, schemaName: 'TestUrlParamsEndpoint' })( - async (options) => JsonResult({ urlParamValue: options.getUrlParams().urlParam }), - ), }, POST: { '/login': LoginAction, '/logout': LogoutAction, - '/testPostBody': Validate({ schema: BoilerplateApiSchemas, schemaName: 'TestPostBodyEndpoint' })( - async (options) => { - const body = await options.getBody() - return JsonResult({ bodyValue: body.value }) - }, - ), }, }, }).catch((err) => { diff --git a/yarn.lock b/yarn.lock index 798b3a1..f621941 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2691,31 +2691,6 @@ __metadata: languageName: node linkType: hard -"furystack-boilerplate-app@workspace:.": - version: 0.0.0-use.local - resolution: "furystack-boilerplate-app@workspace:." - dependencies: - "@eslint/js": "npm:^9.37.0" - "@playwright/test": "npm:^1.56.0" - "@types/node": "npm:^24.7.2" - "@vitest/coverage-v8": "npm:^3.2.4" - eslint: "npm:^9.37.0" - eslint-config-prettier: "npm:^10.1.8" - eslint-plugin-import: "npm:2.32.0" - eslint-plugin-jsdoc: "npm:^61.1.4" - eslint-plugin-playwright: "npm:^2.2.2" - eslint-plugin-prettier: "npm:^5.5.4" - husky: "npm:^9.1.7" - lint-staged: "npm:^16.2.4" - prettier: "npm:^3.6.2" - rimraf: "npm:^6.0.1" - typescript: "npm:^5.9.3" - typescript-eslint: "npm:^8.46.1" - vite: "npm:^7.1.10" - vitest: "npm:^3.2.4" - languageName: unknown - linkType: soft - "generator-function@npm:^2.0.0": version: 2.0.1 resolution: "generator-function@npm:2.0.1" @@ -3874,6 +3849,31 @@ __metadata: languageName: node linkType: hard +"obsidian-core@workspace:.": + version: 0.0.0-use.local + resolution: "obsidian-core@workspace:." + dependencies: + "@eslint/js": "npm:^9.37.0" + "@playwright/test": "npm:^1.56.0" + "@types/node": "npm:^24.7.2" + "@vitest/coverage-v8": "npm:^3.2.4" + eslint: "npm:^9.37.0" + eslint-config-prettier: "npm:^10.1.8" + eslint-plugin-import: "npm:2.32.0" + eslint-plugin-jsdoc: "npm:^61.1.4" + eslint-plugin-playwright: "npm:^2.2.2" + eslint-plugin-prettier: "npm:^5.5.4" + husky: "npm:^9.1.7" + lint-staged: "npm:^16.2.4" + prettier: "npm:^3.6.2" + rimraf: "npm:^6.0.1" + typescript: "npm:^5.9.3" + typescript-eslint: "npm:^8.46.1" + vite: "npm:^7.1.10" + vitest: "npm:^3.2.4" + languageName: unknown + linkType: soft + "once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" From e3695d2a0d11fa2aee550a965a3e3b45904d9053 Mon Sep 17 00:00:00 2001 From: Gallay Date: Wed, 15 Oct 2025 17:27:32 +0200 Subject: [PATCH 2/4] adjusted node versions --- .github/workflows/build-test.yml | 2 +- .github/workflows/check-version-bump.yml | 2 +- .github/workflows/ui-tests.yml | 2 +- .gitignore | 4 +++- azure-pipelines.yml | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f3efb53..eceac51 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [20.x, 21.x] + node-version: [22.x, 24.x] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/check-version-bump.yml b/.github/workflows/check-version-bump.yml index 381634f..898fdf4 100644 --- a/.github/workflows/check-version-bump.yml +++ b/.github/workflows/check-version-bump.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - name: Checkout diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 0d7319a..aea1e41 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [20.x, 22.x] + node-version: [22.x, 24.x] steps: - uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index 367e89f..b084437 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,6 @@ testresults !.yarn/plugins !.yarn/releases !.yarn/sdks -!.yarn/versions \ No newline at end of file +!.yarn/versions + +test-results \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ce92671..30953d3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,7 +17,7 @@ pool: steps: - task: NodeTool@0 inputs: - versionSpec: '20.x' + versionSpec: '22.x' displayName: 'Install Node.js' - script: yarn install displayName: 'Yarn install' From c35688ee31d9bd2f97c8e501f8a2d5926ea354e4 Mon Sep 17 00:00:00 2001 From: Gallay Date: Wed, 15 Oct 2025 17:27:57 +0200 Subject: [PATCH 3/4] prettier fixes --- common/schemas/authentication-api.json | 76 ++++++-------------------- common/schemas/entities.json | 7 +-- 2 files changed, 20 insertions(+), 63 deletions(-) diff --git a/common/schemas/authentication-api.json b/common/schemas/authentication-api.json index d199868..1d1ddec 100644 --- a/common/schemas/authentication-api.json +++ b/common/schemas/authentication-api.json @@ -18,15 +18,11 @@ "type": "boolean" } }, - "required": [ - "isAuthenticated" - ], + "required": ["isAuthenticated"], "additionalProperties": false } }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false }, "/currentUser": { @@ -36,16 +32,11 @@ "$ref": "#/definitions/User" } }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false } }, - "required": [ - "/isAuthenticated", - "/currentUser" - ], + "required": ["/isAuthenticated", "/currentUser"], "additionalProperties": false }, "POST": { @@ -67,17 +58,11 @@ "type": "string" } }, - "required": [ - "username", - "password" - ], + "required": ["username", "password"], "additionalProperties": false } }, - "required": [ - "result", - "body" - ], + "required": ["result", "body"], "additionalProperties": false }, "/logout": { @@ -85,16 +70,11 @@ "properties": { "result": {} }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false } }, - "required": [ - "/login", - "/logout" - ], + "required": ["/login", "/logout"], "additionalProperties": false }, "PATCH": { @@ -108,9 +88,7 @@ "body": {}, "headers": {} }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false } }, @@ -125,9 +103,7 @@ "body": {}, "headers": {} }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false } }, @@ -142,9 +118,7 @@ "body": {}, "headers": {} }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false } }, @@ -159,9 +133,7 @@ "body": {}, "headers": {} }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false } }, @@ -176,9 +148,7 @@ "body": {}, "headers": {} }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false } }, @@ -193,9 +163,7 @@ "body": {}, "headers": {} }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false } }, @@ -210,17 +178,12 @@ "body": {}, "headers": {} }, - "required": [ - "result" - ], + "required": ["result"], "additionalProperties": false } } }, - "required": [ - "GET", - "POST" - ], + "required": ["GET", "POST"], "additionalProperties": false }, "User": { @@ -236,11 +199,8 @@ } } }, - "required": [ - "username", - "roles" - ], + "required": ["username", "roles"], "additionalProperties": false } } -} \ No newline at end of file +} diff --git a/common/schemas/entities.json b/common/schemas/entities.json index aa27afc..ec29351 100644 --- a/common/schemas/entities.json +++ b/common/schemas/entities.json @@ -15,11 +15,8 @@ } } }, - "required": [ - "username", - "roles" - ], + "required": ["username", "roles"], "additionalProperties": false } } -} \ No newline at end of file +} From 2e328b8469a1d434b0e711f1065f2017a8c8dfd3 Mon Sep 17 00:00:00 2001 From: Gallay Date: Wed, 15 Oct 2025 17:41:12 +0200 Subject: [PATCH 4/4] pipeline updates --- .github/workflows/build-test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index eceac51..ee43ab6 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -29,8 +29,11 @@ jobs: - name: Recreate JSON Schemas run: yarn create-schemas && yarn build # an incremental rebuild is neccessary to use the updated schema - name: Test - run: yarn test:unit - - uses: codecov/codecov-action@v2 + run: yarn test:unit --reporter=junit --outputFile=test-report.junit.xml + + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} env: