From 0ed598cb6ff3d820a7a33a1f123b1f78f6f87d60 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Mon, 17 Feb 2025 09:21:28 +0700 Subject: [PATCH] fix: error --- Services/Dockerfile | 6 +- Services/client/package.json | 2 +- Services/client/pnpm-lock.yaml | 2 +- .../client/src/services/KeyCloakService.ts | 12 +- Services/server/pnpm-lock.yaml | 137 +----------------- 5 files changed, 14 insertions(+), 145 deletions(-) diff --git a/Services/Dockerfile b/Services/Dockerfile index b01b725..5969092 100644 --- a/Services/Dockerfile +++ b/Services/Dockerfile @@ -10,7 +10,7 @@ ARG API_ENDPOINT="/api/" WORKDIR /app -FROM base as server +FROM base AS server COPY ./server . FROM server AS deps @@ -20,13 +20,13 @@ FROM server AS build RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN pnpm run build -FROM base as client +FROM base AS client COPY ./client . ENV VITE_API_ENDPOINT="$API_ENDPOINT" RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN pnpm run build -FROM base as prod +FROM base AS prod COPY --from=deps /app/node_modules /app/node_modules COPY --from=build /app/dist /app/dist COPY --from=server /app/static /app/static diff --git a/Services/client/package.json b/Services/client/package.json index 86cf8ca..8f29bc5 100644 --- a/Services/client/package.json +++ b/Services/client/package.json @@ -19,7 +19,7 @@ "@quasar/extras": "^1.16.8", "@tsconfig/node18": "^18.2.2", "axios": "^1.6.2", - "keycloak-js": "^23.0.0", + "keycloak-js": "^23.0.7", "mime": "^4.0.0", "nanoid": "^5.0.4", "pinia": "^2.1.7", diff --git a/Services/client/pnpm-lock.yaml b/Services/client/pnpm-lock.yaml index fef7467..224b2dc 100644 --- a/Services/client/pnpm-lock.yaml +++ b/Services/client/pnpm-lock.yaml @@ -18,7 +18,7 @@ importers: specifier: ^1.6.2 version: 1.6.2 keycloak-js: - specifier: ^23.0.0 + specifier: ^23.0.7 version: 23.0.7 mime: specifier: ^4.0.0 diff --git a/Services/client/src/services/KeyCloakService.ts b/Services/client/src/services/KeyCloakService.ts index f5e688e..a635452 100644 --- a/Services/client/src/services/KeyCloakService.ts +++ b/Services/client/src/services/KeyCloakService.ts @@ -1,14 +1,10 @@ import Keycloak from 'keycloak-js' -const keycloakConfig = { +const keycloak = new Keycloak({ realm: import.meta.env.KC_REALMS, - 'auth-server-url': import.meta.env.KC_URL, - 'ssl-required': 'external', - resource: 'edm', - 'public-client': true, - 'confidential-port': 0, -} -const keycloak = new Keycloak(keycloakConfig) + url: import.meta.env.KC_URL, + clientId: 'edm', +}) let init = false diff --git a/Services/server/pnpm-lock.yaml b/Services/server/pnpm-lock.yaml index b13c161..d6152dc 100644 --- a/Services/server/pnpm-lock.yaml +++ b/Services/server/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: '@elastic/elasticsearch': specifier: ^8.10.0 - version: 8.17.0 + version: 8.10.0 '@tsoa/runtime': specifier: ^5.0.0 version: 5.0.0 @@ -96,9 +96,9 @@ packages: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} - '@elastic/elasticsearch@8.17.0': - resolution: {integrity: sha512-FZ+gQUrPsMpQ2RRIXwTmCoUeFCEausMhp4eQOyxT9j1cwGXHJrhelR6jffM1SC95kQUkB7+TcTq7oQ+bG2BQ9g==} - engines: {node: '>=18'} + '@elastic/elasticsearch@8.10.0': + resolution: {integrity: sha512-RIEyqz0D18bz/dK+wJltaak+7wKaxDELxuiwOJhuMrvbrBsYDFnEoTdP/TZ0YszHBgnRPGqBDBgH/FHNgHObiQ==} + engines: {node: '>=14'} '@elastic/transport@8.9.1': resolution: {integrity: sha512-jasKNQeOb1vNf9aEYg+8zXmetaFjApDTSCC4QTl6aTixvyiRiSLcCiB8P6Q0lY9JIII/BhqNl8WbpFnsKitntw==} @@ -128,9 +128,6 @@ packages: '@socket.io/component-emitter@3.1.2': resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} - '@swc/helpers@0.5.15': - resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} - '@tsconfig/node10@1.0.11': resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} @@ -158,12 +155,6 @@ packages: '@types/body-parser@1.19.5': resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} - '@types/command-line-args@5.2.3': - resolution: {integrity: sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==} - - '@types/command-line-usage@5.0.4': - resolution: {integrity: sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg==} - '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} @@ -244,24 +235,12 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} - apache-arrow@18.1.0: - resolution: {integrity: sha512-v/ShMp57iBnBp4lDgV8Jx3d3Q5/Hac25FWmQ98eMahUiHPXcvwIMKJD0hBIgclm/FCG+LwPkAKtkRO1O/W0YGg==} - hasBin: true - arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - array-back@3.1.0: - resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} - engines: {node: '>=6'} - - array-back@6.2.2: - resolution: {integrity: sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==} - engines: {node: '>=12.17'} - array-buffer-byte-length@1.0.2: resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} engines: {node: '>= 0.4'} @@ -344,10 +323,6 @@ packages: resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} engines: {node: '>= 0.4'} - chalk-template@0.4.0: - resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==} - engines: {node: '>=12'} - chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -367,14 +342,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - command-line-args@5.2.1: - resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} - engines: {node: '>=4.0.0'} - - command-line-usage@7.0.3: - resolution: {integrity: sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q==} - engines: {node: '>=12.20.0'} - concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -584,13 +551,6 @@ packages: resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} engines: {node: '>= 0.8'} - find-replace@3.0.0: - resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} - engines: {node: '>=4.0.0'} - - flatbuffers@24.12.23: - resolution: {integrity: sha512-dLVCAISd5mhls514keQzmEG6QHmUUsNuWsb4tFafIUwvvgDjXhtfAYSKOzt5SWOy+qByV5pbsDZ+Vb7HUOBEdA==} - for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -847,19 +807,12 @@ packages: iterate-value@1.0.2: resolution: {integrity: sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==} - json-bignum@0.0.3: - resolution: {integrity: sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg==} - engines: {node: '>=0.8'} - jsonc-parser@3.3.1: resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - lodash.camelcase@4.3.0: - resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} - lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -1240,10 +1193,6 @@ packages: peerDependencies: express: '>=4.0.0 || >=5.0.0-beta' - table-layout@4.1.1: - resolution: {integrity: sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA==} - engines: {node: '>=12.17'} - through2@4.0.2: resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} @@ -1322,14 +1271,6 @@ packages: engines: {node: '>=14.17'} hasBin: true - typical@4.0.0: - resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} - engines: {node: '>=8'} - - typical@7.3.0: - resolution: {integrity: sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==} - engines: {node: '>=12.17'} - uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} @@ -1409,10 +1350,6 @@ packages: wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} - wordwrapjs@5.1.0: - resolution: {integrity: sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==} - engines: {node: '>=12.17'} - wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -1478,10 +1415,9 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@elastic/elasticsearch@8.17.0': + '@elastic/elasticsearch@8.10.0': dependencies: '@elastic/transport': 8.9.1 - apache-arrow: 18.1.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -1515,10 +1451,6 @@ snapshots: '@socket.io/component-emitter@3.1.2': {} - '@swc/helpers@0.5.15': - dependencies: - tslib: 2.8.1 - '@tsconfig/node10@1.0.11': {} '@tsconfig/node12@1.0.11': {} @@ -1557,10 +1489,6 @@ snapshots: '@types/connect': 3.4.38 '@types/node': 20.17.12 - '@types/command-line-args@5.2.3': {} - - '@types/command-line-usage@5.0.4': {} - '@types/connect@3.4.38': dependencies: '@types/node': 20.17.12 @@ -1656,28 +1584,12 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 - apache-arrow@18.1.0: - dependencies: - '@swc/helpers': 0.5.15 - '@types/command-line-args': 5.2.3 - '@types/command-line-usage': 5.0.4 - '@types/node': 20.17.12 - command-line-args: 5.2.1 - command-line-usage: 7.0.3 - flatbuffers: 24.12.23 - json-bignum: 0.0.3 - tslib: 2.8.1 - arg@4.1.3: {} argparse@1.0.10: dependencies: sprintf-js: 1.0.3 - array-back@3.1.0: {} - - array-back@6.2.2: {} - array-buffer-byte-length@1.0.2: dependencies: call-bound: 1.0.3 @@ -1785,10 +1697,6 @@ snapshots: call-bind-apply-helpers: 1.0.1 get-intrinsic: 1.2.7 - chalk-template@0.4.0: - dependencies: - chalk: 4.1.2 - chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -1818,20 +1726,6 @@ snapshots: color-name@1.1.4: {} - command-line-args@5.2.1: - dependencies: - array-back: 3.1.0 - find-replace: 3.0.0 - lodash.camelcase: 4.3.0 - typical: 4.0.0 - - command-line-usage@7.0.3: - dependencies: - array-back: 6.2.2 - chalk-template: 0.4.0 - table-layout: 4.1.1 - typical: 7.3.0 - concat-map@0.0.1: {} concurrently@8.2.2: @@ -2135,12 +2029,6 @@ snapshots: transitivePeerDependencies: - supports-color - find-replace@3.0.0: - dependencies: - array-back: 3.1.0 - - flatbuffers@24.12.23: {} - for-each@0.3.3: dependencies: is-callable: 1.2.7 @@ -2415,8 +2303,6 @@ snapshots: es-get-iterator: 1.1.3 iterate-iterator: 1.0.2 - json-bignum@0.0.3: {} - jsonc-parser@3.3.1: {} jsonfile@6.1.0: @@ -2425,8 +2311,6 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 - lodash.camelcase@4.3.0: {} - lodash@4.17.21: {} lunr@2.3.9: {} @@ -2873,11 +2757,6 @@ snapshots: express: 4.21.2 swagger-ui-dist: 5.18.2 - table-layout@4.1.1: - dependencies: - array-back: 6.2.2 - wordwrapjs: 5.1.0 - through2@4.0.2: dependencies: readable-stream: 3.6.2 @@ -2967,10 +2846,6 @@ snapshots: typescript@5.7.3: {} - typical@4.0.0: {} - - typical@7.3.0: {} - uglify-js@3.19.3: optional: true @@ -3066,8 +2941,6 @@ snapshots: wordwrap@1.0.0: {} - wordwrapjs@5.1.0: {} - wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0