From bc4885aa1a3f407d5e9832664543aef6892fe85a Mon Sep 17 00:00:00 2001 From: Ralf Aron Date: Fri, 19 Apr 2024 11:08:23 +0200 Subject: [PATCH] fix: tsx replaced by ts-node --- create-app-info.js | 56 --- create-app-info.ts | 86 ++++ package-lock.json | 451 +----------------- package.json | 5 +- .../aas-lib/src/lib/busy-indicator.service.ts | 10 +- .../src/test/busy-indicator.service.spec.ts | 10 +- projects/aas-server/app-info.json | 346 +++++++++++++- .../aas-provider/hierarchical-structure.ts | 10 +- tsconfig.json | 5 +- 9 files changed, 460 insertions(+), 519 deletions(-) delete mode 100644 create-app-info.js create mode 100644 create-app-info.ts diff --git a/create-app-info.js b/create-app-info.js deleted file mode 100644 index ccc28185..00000000 --- a/create-app-info.js +++ /dev/null @@ -1,56 +0,0 @@ -import { readFile, writeFile } from 'fs/promises'; -import { existsSync } from 'fs'; -import { dirname, resolve, join } from 'path'; -import { fileURLToPath } from 'url'; - -const __dirname = dirname(fileURLToPath(import.meta.url)); - -main(); - -async function main() { - const project = await read(resolve(__dirname, 'package.json')); - const file = resolve(__dirname, 'projects/aas-server/app-info.json'); - const appInfo = await read(file); - for (const item in appInfo) { - appInfo[item] = project[item]; - } - - appInfo.libraries = await readLibrariesAsync(project); - - await write(file, appInfo); -} - -async function read(file) { - return JSON.parse(await readFile(file)); -} - -async function write(file, data) { - return writeFile(file, JSON.stringify(data)); -} - -async function readLibrariesAsync(project) { - const libraries = []; - let nodeModulesFolder = join(__dirname, 'node_modules'); - if (existsSync(nodeModulesFolder)) { - for (const name in project.dependencies) { - let packageFile = join(nodeModulesFolder, name, 'package.json'); - if (existsSync(packageFile)) { - try { - const pkg = JSON.parse((await readFile(packageFile)).toString()); - libraries.push({ - name: pkg.name, - version: pkg.version, - description: pkg.description, - license: pkg.license, - homepage: pkg.homepage - }); - } catch (error) { - noop(); - } - } - } - } - - return libraries; -} - diff --git a/create-app-info.ts b/create-app-info.ts new file mode 100644 index 00000000..ee295c49 --- /dev/null +++ b/create-app-info.ts @@ -0,0 +1,86 @@ +import { readFile, writeFile } from 'fs/promises'; +import { existsSync } from 'fs'; +import { dirname, resolve, join } from 'path'; +import { fileURLToPath } from 'url'; + +interface Package { + name: string; + version: string; + description: string; + author: string; + homepage: string; + license: string; + dependencies: Record; +} + +interface ApplicationInfo { + name: string; + version: string; + description: string; + author: string; + homepage: string; + license: string; + libraries: Library[]; +} + +interface Library { + name: string; + version: string; + description: string; + license: string; + homepage: string; +} + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +await main(); + +async function main(): Promise { + const project: Package = await read(resolve(__dirname, 'package.json')); + const file = resolve(__dirname, 'projects/aas-server/app-info.json'); + const appInfo = await read(file); + + appInfo.name = project.name; + appInfo.version = project.version; + appInfo.description = project.description; + appInfo.author = project.author; + appInfo.homepage = project.homepage; + appInfo.license = project.license; + appInfo.libraries = await readLibrariesAsync(project); + + await write(file, appInfo); +} + +async function read(file: string): Promise { + return JSON.parse((await readFile(file)).toString()); +} + +function write(file: string, data: object): Promise { + return writeFile(file, JSON.stringify(data, undefined, 2)); +} + +async function readLibrariesAsync(project: Package): Promise { + const libraries: Library[] = []; + const nodeModulesFolder = join(__dirname, 'node_modules'); + if (existsSync(nodeModulesFolder)) { + for (const name in project.dependencies) { + const packageFile = join(nodeModulesFolder, name, 'package.json'); + if (existsSync(packageFile)) { + try { + const pkg = JSON.parse((await readFile(packageFile)).toString()); + libraries.push({ + name: pkg.name, + version: pkg.version, + description: pkg.description, + license: pkg.license, + homepage: pkg.homepage, + }); + } catch (error) { + console.error(error); + } + } + } + } + + return libraries; +} diff --git a/package-lock.json b/package-lock.json index b280d3f1..dadf7527 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "aas-portal-project", - "version": "3.0.0-development.47", + "version": "3.0.0-development.49", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "aas-portal-project", - "version": "3.0.0-development.47", + "version": "3.0.0-development.49", "license": "Apache-2.0", "workspaces": [ "./projects/common", @@ -119,7 +119,6 @@ "supertest": "^6.3.4", "ts-jest": "^29.1.2", "ts-node": "^10.9.2", - "tsx": "^4.7.2", "typescript": "^5.2.2" } }, @@ -13355,18 +13354,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-tsconfig": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", - "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", - "dev": true, - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -26348,15 +26335,6 @@ "node": ">=8" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, "node_modules/resolve-url-loader": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz", @@ -28969,431 +28947,6 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "node_modules/tsx": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.2.tgz", - "integrity": "sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==", - "dev": true, - "dependencies": { - "esbuild": "~0.19.10", - "get-tsconfig": "^4.7.2" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, - "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", - "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/android-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", - "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/android-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", - "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/android-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", - "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", - "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/darwin-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", - "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", - "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", - "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", - "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", - "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", - "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-loong64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", - "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", - "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", - "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", - "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-s390x": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", - "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/linux-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", - "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", - "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", - "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/sunos-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", - "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/win32-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", - "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/win32-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", - "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/@esbuild/win32-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", - "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/tsx/node_modules/esbuild": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", - "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.12", - "@esbuild/android-arm": "0.19.12", - "@esbuild/android-arm64": "0.19.12", - "@esbuild/android-x64": "0.19.12", - "@esbuild/darwin-arm64": "0.19.12", - "@esbuild/darwin-x64": "0.19.12", - "@esbuild/freebsd-arm64": "0.19.12", - "@esbuild/freebsd-x64": "0.19.12", - "@esbuild/linux-arm": "0.19.12", - "@esbuild/linux-arm64": "0.19.12", - "@esbuild/linux-ia32": "0.19.12", - "@esbuild/linux-loong64": "0.19.12", - "@esbuild/linux-mips64el": "0.19.12", - "@esbuild/linux-ppc64": "0.19.12", - "@esbuild/linux-riscv64": "0.19.12", - "@esbuild/linux-s390x": "0.19.12", - "@esbuild/linux-x64": "0.19.12", - "@esbuild/netbsd-x64": "0.19.12", - "@esbuild/openbsd-x64": "0.19.12", - "@esbuild/sunos-x64": "0.19.12", - "@esbuild/win32-arm64": "0.19.12", - "@esbuild/win32-ia32": "0.19.12", - "@esbuild/win32-x64": "0.19.12" - } - }, "node_modules/tsyringe": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.8.0.tgz", diff --git a/package.json b/package.json index 07438a59..2725b68f 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "scripts": { "tsoa": "npm run tsoa -w aas-server", "start": "docker build -f Dockerfile -t aasportal . && docker run -d --name AASPortal -p 80:80 --restart=always aasportal", - "header": "tsx copyright-header.ts", - "coverage": "tsx coverage-summary.ts", + "header": "node --no-warnings --loader ts-node/esm copyright-header.ts", + "coverage": "node --no-warnings --loader ts-node/esm coverage-summary.ts", "user-db": "docker run -p 27017:27017 -d --name aasportal-users -e MONGO_INITDB_DATABASE=aasportal-users mongo", "lint": "npm run lint -ws", "format": "npm run format -ws", @@ -141,7 +141,6 @@ "supertest": "^6.3.4", "ts-jest": "^29.1.2", "ts-node": "^10.9.2", - "tsx": "^4.7.2", "typescript": "^5.2.2" } } diff --git a/projects/aas-lib/src/lib/busy-indicator.service.ts b/projects/aas-lib/src/lib/busy-indicator.service.ts index c42e186e..a64552ee 100644 --- a/projects/aas-lib/src/lib/busy-indicator.service.ts +++ b/projects/aas-lib/src/lib/busy-indicator.service.ts @@ -1,3 +1,11 @@ +/****************************************************************************** + * + * Copyright (c) 2019-2024 Fraunhofer IOSB-INA Lemgo, + * eine rechtlich nicht selbstaendige Einrichtung der Fraunhofer-Gesellschaft + * zur Foerderung der angewandten Forschung e.V. + * + *****************************************************************************/ + import { Injectable } from '@angular/core'; import { BehaviorSubject, map } from 'rxjs'; @@ -21,4 +29,4 @@ export class BusyIndicatorService { this.busyCount.next(busyCount - 1); } } -} +} \ No newline at end of file diff --git a/projects/aas-lib/src/test/busy-indicator.service.spec.ts b/projects/aas-lib/src/test/busy-indicator.service.spec.ts index 6eeb1b5f..eee3de7d 100644 --- a/projects/aas-lib/src/test/busy-indicator.service.spec.ts +++ b/projects/aas-lib/src/test/busy-indicator.service.spec.ts @@ -1,3 +1,11 @@ +/****************************************************************************** + * + * Copyright (c) 2019-2024 Fraunhofer IOSB-INA Lemgo, + * eine rechtlich nicht selbstaendige Einrichtung der Fraunhofer-Gesellschaft + * zur Foerderung der angewandten Forschung e.V. + * + *****************************************************************************/ + import { TestBed } from '@angular/core/testing'; import { BusyIndicatorService } from '../lib/busy-indicator.service'; @@ -13,4 +21,4 @@ describe('BusyIndicatorService', () => { it('should be created', () => { expect(service).toBeTruthy(); }); -}); +}); \ No newline at end of file diff --git a/projects/aas-server/app-info.json b/projects/aas-server/app-info.json index d7597d33..327a5a77 100644 --- a/projects/aas-server/app-info.json +++ b/projects/aas-server/app-info.json @@ -1,9 +1,341 @@ { - "name": "aas-portal-project", - "version": "3.0.0", - "description": "Web-based visualization and control of asset administration shells.", - "author": "Fraunhofer IOSB-INA", - "homepage": "https://www.iosb-ina.fraunhofer.de/", - "license": "Apache-2.0", - "libraries": [] + "name": "aas-portal-project", + "version": "3.0.0-development.49", + "description": "Web-based visualization and control of asset administration shells.", + "author": "Fraunhofer IOSB-INA", + "homepage": "https://www.iosb-ina.fraunhofer.de/", + "license": "Apache-2.0", + "libraries": [ + { + "name": "@angular/animations", + "version": "17.3.4", + "description": "Angular - animations integration with web-animations", + "license": "MIT" + }, + { + "name": "@angular/common", + "version": "17.3.4", + "description": "Angular - commonly needed directives and services", + "license": "MIT" + }, + { + "name": "@angular/compiler", + "version": "17.3.4", + "description": "Angular - the compiler library", + "license": "MIT" + }, + { + "name": "@angular/core", + "version": "17.3.4", + "description": "Angular - the core framework", + "license": "MIT" + }, + { + "name": "@angular/forms", + "version": "17.3.4", + "description": "Angular - directives and services for creating forms", + "license": "MIT" + }, + { + "name": "@angular/localize", + "version": "17.3.4", + "description": "Angular - library for localizing messages", + "license": "MIT" + }, + { + "name": "@angular/platform-browser", + "version": "17.3.4", + "description": "Angular - library for using Angular in a web browser", + "license": "MIT" + }, + { + "name": "@angular/platform-browser-dynamic", + "version": "17.3.4", + "description": "Angular - library for using Angular in a web browser with JIT compilation", + "license": "MIT" + }, + { + "name": "@angular/router", + "version": "17.3.4", + "description": "Angular - the routing library", + "license": "MIT", + "homepage": "https://github.com/angular/angular/tree/main/packages/router" + }, + { + "name": "@babel/polyfill", + "version": "7.12.1", + "description": "Provides polyfills necessary for a full ES2015+ environment", + "license": "MIT", + "homepage": "https://babeljs.io/" + }, + { + "name": "@ng-bootstrap/ng-bootstrap", + "version": "16.0.0", + "description": "Angular powered Bootstrap", + "license": "MIT", + "homepage": "https://github.com/ng-bootstrap/ng-bootstrap#readme" + }, + { + "name": "@ngrx/component-store", + "version": "17.2.0", + "description": "Reactive store for component state", + "license": "MIT", + "homepage": "https://github.com/ngrx/platform#readme" + }, + { + "name": "@ngrx/effects", + "version": "17.2.0", + "description": "Side effect model for @ngrx/store", + "license": "MIT", + "homepage": "https://github.com/ngrx/platform#readme" + }, + { + "name": "@ngrx/store", + "version": "17.2.0", + "description": "RxJS powered Redux for Angular apps", + "license": "MIT", + "homepage": "https://github.com/ngrx/platform#readme" + }, + { + "name": "@ngx-translate/core", + "version": "15.0.0", + "license": "SEE LICENSE IN LICENSE" + }, + { + "name": "@ngx-translate/http-loader", + "version": "8.0.0", + "license": "SEE LICENSE IN LICENSE" + }, + { + "name": "@popperjs/core", + "version": "2.11.8", + "description": "Tooltip and Popover Positioning Engine", + "license": "MIT" + }, + { + "name": "@xmldom/xmldom", + "version": "0.8.10", + "description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.", + "license": "MIT", + "homepage": "https://github.com/xmldom/xmldom" + }, + { + "name": "bcryptjs", + "version": "2.4.3", + "description": "Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'.", + "license": "MIT" + }, + { + "name": "bootstrap", + "version": "5.3.3", + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", + "license": "MIT", + "homepage": "https://getbootstrap.com/" + }, + { + "name": "bootstrap-icons", + "version": "1.11.3", + "description": "Official open source SVG icon library for Bootstrap", + "license": "MIT", + "homepage": "https://icons.getbootstrap.com/" + }, + { + "name": "chart.js", + "version": "4.4.2", + "description": "Simple HTML5 charts using the canvas element.", + "license": "MIT", + "homepage": "https://www.chartjs.org" + }, + { + "name": "cors", + "version": "2.8.5", + "description": "Node.js CORS middleware", + "license": "MIT" + }, + { + "name": "express", + "version": "4.19.2", + "description": "Fast, unopinionated, minimalist web framework", + "license": "MIT", + "homepage": "http://expressjs.com/" + }, + { + "name": "form-data", + "version": "4.0.0", + "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", + "license": "MIT" + }, + { + "name": "jimp", + "version": "0.22.12", + "description": "An image processing library written entirely in JavaScript (i.e. zero external or native dependencies)", + "license": "MIT" + }, + { + "name": "jsonwebtoken", + "version": "9.0.2", + "description": "JSON Web Token implementation (symmetric and asymmetric)", + "license": "MIT" + }, + { + "name": "jszip", + "version": "3.10.1", + "description": "Create, read and edit .zip files with JavaScript http://stuartk.com/jszip", + "license": "(MIT OR GPL-3.0-or-later)" + }, + { + "name": "jwt-decode", + "version": "4.0.0", + "description": "Decode JWT tokens, mostly useful for browser applications.", + "license": "MIT", + "homepage": "https://github.com/auth0/jwt-decode#readme" + }, + { + "name": "lodash-es", + "version": "4.17.21", + "description": "Lodash exported as ES modules.", + "license": "MIT", + "homepage": "https://lodash.com/custom-builds" + }, + { + "name": "lowdb", + "version": "7.0.1", + "description": "Tiny local JSON database for Node, Electron and the browser", + "license": "MIT", + "homepage": "https://github.com/typicode/lowdb#readme" + }, + { + "name": "mongoose", + "version": "8.3.1", + "description": "Mongoose MongoDB ODM", + "license": "MIT", + "homepage": "https://mongoosejs.com" + }, + { + "name": "morgan", + "version": "1.10.0", + "description": "HTTP request logger middleware for node.js", + "license": "MIT" + }, + { + "name": "multer", + "version": "1.4.5-lts.1", + "description": "Middleware for handling `multipart/form-data`.", + "license": "MIT" + }, + { + "name": "mysql2", + "version": "3.9.4", + "description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS", + "license": "MIT", + "homepage": "https://sidorares.github.io/node-mysql2/docs" + }, + { + "name": "node-opcua", + "version": "2.124.0", + "description": "pure nodejs OPCUA SDK - module node-opcua", + "license": "MIT", + "homepage": "http://node-opcua.github.io/" + }, + { + "name": "node-opcua-client-crawler", + "version": "2.124.0", + "description": "pure nodejs OPCUA SDK - module client-crawler", + "license": "MIT", + "homepage": "http://node-opcua.github.io/" + }, + { + "name": "nodemailer", + "version": "6.9.13", + "description": "Easy as cake e-mail sending from your Node.js applications", + "license": "MIT-0", + "homepage": "https://nodemailer.com/" + }, + { + "name": "reflect-metadata", + "version": "0.2.2", + "description": "Polyfill for Metadata Reflection API", + "license": "Apache-2.0", + "homepage": "http://rbuckton.github.io/reflect-metadata" + }, + { + "name": "rxjs", + "version": "7.8.1", + "description": "Reactive Extensions for modern JavaScript", + "license": "Apache-2.0", + "homepage": "https://rxjs.dev" + }, + { + "name": "swagger-ui-express", + "version": "5.0.0", + "description": "Swagger UI Express", + "license": "MIT", + "homepage": "https://github.com/scottie1984/swagger-ui-express" + }, + { + "name": "tslib", + "version": "2.6.2", + "description": "Runtime library for TypeScript helper functions", + "license": "0BSD", + "homepage": "https://www.typescriptlang.org/" + }, + { + "name": "tsoa", + "version": "5.1.1", + "description": "Build swagger-compliant REST APIs using TypeScript and Node", + "license": "MIT" + }, + { + "name": "tsyringe", + "version": "4.8.0", + "description": "Lightweight dependency injection container for JavaScript/TypeScript", + "license": "MIT", + "homepage": "https://github.com/Microsoft/tsyringe#readme" + }, + { + "name": "uuid", + "version": "9.0.1", + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "license": "MIT" + }, + { + "name": "webdav", + "version": "5.5.0", + "description": "WebDAV client for NodeJS", + "license": "MIT", + "homepage": "https://github.com/perry-mitchell/webdav-client#readme" + }, + { + "name": "winston", + "version": "3.13.0", + "description": "A logger for just about everything.", + "license": "MIT" + }, + { + "name": "winston-daily-rotate-file", + "version": "5.0.0", + "description": "A transport for winston which logs to a rotating file each day.", + "license": "MIT", + "homepage": "https://github.com/winstonjs/winston-daily-rotate-file#readme" + }, + { + "name": "ws", + "version": "8.16.0", + "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js", + "license": "MIT", + "homepage": "https://github.com/websockets/ws" + }, + { + "name": "xpath", + "version": "0.0.34", + "description": "DOM 3 XPath implemention and helper for node.js and the web", + "license": "MIT" + }, + { + "name": "zone.js", + "version": "0.14.4", + "description": "Zones for JavaScript", + "license": "MIT" + } + ] } \ No newline at end of file diff --git a/projects/aas-server/src/app/aas-provider/hierarchical-structure.ts b/projects/aas-server/src/app/aas-provider/hierarchical-structure.ts index fae4b122..f1a67269 100644 --- a/projects/aas-server/src/app/aas-provider/hierarchical-structure.ts +++ b/projects/aas-server/src/app/aas-provider/hierarchical-structure.ts @@ -1,3 +1,11 @@ +/****************************************************************************** + * + * Copyright (c) 2019-2024 Fraunhofer IOSB-INA Lemgo, + * eine rechtlich nicht selbstaendige Einrichtung der Fraunhofer-Gesellschaft + * zur Foerderung der angewandten Forschung e.V. + * + *****************************************************************************/ + import { AASDocument, aas, isEntity, isRelationshipElement, selectReferable } from 'common'; export type ArcheType = 'Full' | 'OneDown' | 'OneUp'; @@ -164,4 +172,4 @@ export class HierarchicalStructure extends HierarchicalStructureElement { 'https://admin-shell.io/idta/HierarchicalStructures/Node/1/0' ); } -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 4d435f8f..3b606c5d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,5 +16,8 @@ "esModuleInterop": true, "moduleResolution": "NodeNext", "module": "NodeNext" - } + }, + "ts-node": { + "esm": true + } } \ No newline at end of file