From acf84ccbe5726064d5ac00c511bc5c5521fdafba Mon Sep 17 00:00:00 2001 From: GZTime Date: Fri, 16 Aug 2024 17:33:36 +0800 Subject: [PATCH 1/6] fix(server): remove unnecessary mimetypes --- src/GZCTF/Program.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/GZCTF/Program.cs b/src/GZCTF/Program.cs index 4967a7876..d811c5c4e 100644 --- a/src/GZCTF/Program.cs +++ b/src/GZCTF/Program.cs @@ -281,9 +281,8 @@ options.Providers.Add(); options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat( [ - MediaTypeNames.Application.Pdf, - MediaTypeNames.Application.Octet, - MediaTypeNames.Application.Zip + // See others in ResponseCompressionDefaults.MimeTypes + MediaTypeNames.Application.Pdf ] ); options.EnableForHttps = true; From 7e239d1188d52c79cccd446dc6b69c2027d8c764 Mon Sep 17 00:00:00 2001 From: GZTime Date: Sat, 17 Aug 2024 22:15:34 +0800 Subject: [PATCH 2/6] release: bump version to v0.21.3 --- CHANGELOG.md | 12 + docs/package.json | 2 +- src/GZCTF.Test/GZCTF.Test.csproj | 2 +- src/GZCTF.sln | 2 +- src/GZCTF/ClientApp/package.json | 10 +- src/GZCTF/ClientApp/pnpm-lock.yaml | 398 ++++++++++------------------- src/GZCTF/GZCTF.csproj | 4 +- 7 files changed, 151 insertions(+), 279 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de9f02f94..ebc4bd86b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to [**GZCTF**](https://github.com/GZTimeWalker/GZCTF) will be documented in this file. +--- +## [0.21.3](https://github.com/GZTimeWalker/GZCTF/compare/v0.21.2..v0.21.3) - 2024-08-16 + +### ⛰️ Features + +- Add zstd compression support - ([4ae144](https://github.com/GZTimeWalker/GZCTF/commit/4ae144)) by **Steven He** +- Enable response compression for more scenarios - ([bda153](https://github.com/GZTimeWalker/GZCTF/commit/bda153)) by **Steven He** + +### 🐛 Bug Fixes + +- **(server)** remove unnecessary mimetypes - ([acf84c](https://github.com/GZTimeWalker/GZCTF/commit/acf84c)) by **GZTime** + --- ## [0.21.2](https://github.com/GZTimeWalker/GZCTF/compare/v0.21.1..v0.21.2) - 2024-08-15 diff --git a/docs/package.json b/docs/package.json index 0db3553d0..b1ba85ec8 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "gzctf-docs", - "version": "0.21.2", + "version": "0.21.3", "private": true, "scripts": { "dev": "next", diff --git a/src/GZCTF.Test/GZCTF.Test.csproj b/src/GZCTF.Test/GZCTF.Test.csproj index 692de0869..317ef5de8 100644 --- a/src/GZCTF.Test/GZCTF.Test.csproj +++ b/src/GZCTF.Test/GZCTF.Test.csproj @@ -6,7 +6,7 @@ false true Debug;Release;GenAPI - 0.21.2 + 0.21.3 True 4 diff --git a/src/GZCTF.sln b/src/GZCTF.sln index 21551b406..5fe37b483 100644 --- a/src/GZCTF.sln +++ b/src/GZCTF.sln @@ -40,6 +40,6 @@ Global SolutionGuid = {643F6AF8-C22F-4E8E-9AB2-504B7C560CD6} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution - version = 0.21.2 + version = 0.21.3 EndGlobalSection EndGlobal diff --git a/src/GZCTF/ClientApp/package.json b/src/GZCTF/ClientApp/package.json index 0b3a99136..907983671 100644 --- a/src/GZCTF/ClientApp/package.json +++ b/src/GZCTF/ClientApp/package.json @@ -1,6 +1,6 @@ { "name": "gzctf-client", - "version": "0.21.2", + "version": "0.21.3", "private": true, "type": "module", "scripts": { @@ -28,7 +28,7 @@ "@mdi/js": "^7.4.47", "@mdi/react": "^1.6.1", "@microsoft/signalr": "^8.0.7", - "chroma-js": "2.6.1-0", + "chroma-js": "^2.6.0", "clsx": "^2.1.1", "dayjs": "^1.11.12", "echarts": "^5.5.1", @@ -36,7 +36,7 @@ "embla-carousel": "^8.1.8", "embla-carousel-autoplay": "^8.1.8", "embla-carousel-react": "^8.1.8", - "i18next": "^23.12.6", + "i18next": "^23.13.0", "i18next-browser-languagedetector": "^8.0.0", "katex": "^0.16.11", "lz-string": "^1.5.0", @@ -64,7 +64,7 @@ "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/chroma-js": "^2.4.4", "@types/katex": "^0.16.7", - "@types/node": "22.3.0", + "@types/node": "22.4.0", "@types/prismjs": "^1.26.4", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", @@ -76,7 +76,7 @@ "eslint": "^9.9.0", "eslint-plugin-oxlint": "^0.7.2", "eslint-plugin-react": "^7.35.0", - "eslint-plugin-react-hooks": "^5.1.0-rc.0", + "eslint-plugin-react-hooks": "5.1.0-rc-fb9a90fa48-20240614", "form-data": "~4.0.0", "globals": "^15.9.0", "lodash": "^4.17.21", diff --git a/src/GZCTF/ClientApp/pnpm-lock.yaml b/src/GZCTF/ClientApp/pnpm-lock.yaml index 3f809459b..7e013e471 100644 --- a/src/GZCTF/ClientApp/pnpm-lock.yaml +++ b/src/GZCTF/ClientApp/pnpm-lock.yaml @@ -22,7 +22,7 @@ importers: version: 7.12.1(@mantine/core@7.12.1(@mantine/hooks@7.12.1(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.1(react@18.3.1))(embla-carousel-react@8.1.8(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mantine/colors-generator': specifier: ^7.12.1 - version: 7.12.1(chroma-js@2.6.1-0) + version: 7.12.1(chroma-js@2.6.0) '@mantine/core': specifier: ^7.12.1 version: 7.12.1(@mantine/hooks@7.12.1(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -60,8 +60,8 @@ importers: specifier: ^8.0.7 version: 8.0.7 chroma-js: - specifier: 2.6.1-0 - version: 2.6.1-0 + specifier: ^2.6.0 + version: 2.6.0 clsx: specifier: ^2.1.1 version: 2.1.1 @@ -84,8 +84,8 @@ importers: specifier: ^8.1.8 version: 8.1.8(react@18.3.1) i18next: - specifier: ^23.12.6 - version: 23.12.6 + specifier: ^23.13.0 + version: 23.13.0 i18next-browser-languagedetector: specifier: ^8.0.0 version: 8.0.0 @@ -121,7 +121,7 @@ importers: version: 1.10.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-i18next: specifier: ^15.0.1 - version: 15.0.1(i18next@23.12.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 15.0.1(i18next@23.13.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-pdf: specifier: ^9.1.0 version: 9.1.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -149,10 +149,10 @@ importers: version: 10.0.0 '@kainstar/vite-plugin-i18next-loader': specifier: ^1.0.3 - version: 1.0.3(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 1.0.3(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) '@nabla/vite-plugin-eslint': specifier: ^2.0.4 - version: 2.0.4(eslint@9.9.0)(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 2.0.4(eslint@9.9.0)(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) '@trivago/prettier-plugin-sort-imports': specifier: ^4.3.0 version: 4.3.0(prettier@3.3.3) @@ -163,8 +163,8 @@ importers: specifier: ^0.16.7 version: 0.16.7 '@types/node': - specifier: 22.3.0 - version: 22.3.0 + specifier: 22.4.0 + version: 22.4.0 '@types/prismjs': specifier: ^1.26.4 version: 1.26.4 @@ -182,7 +182,7 @@ importers: version: 8.1.0(eslint@9.9.0)(typescript@5.5.4) '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 4.3.1(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) axios: specifier: ^1.7.4 version: 1.7.4 @@ -199,7 +199,7 @@ importers: specifier: ^7.35.0 version: 7.35.0(eslint@9.9.0) eslint-plugin-react-hooks: - specifier: ^5.1.0-rc.0 + specifier: 5.1.0-rc-fb9a90fa48-20240614 version: 5.1.0-rc-fb9a90fa48-20240614(eslint@9.9.0) form-data: specifier: ~4.0.0 @@ -239,19 +239,19 @@ importers: version: 5.5.4 vite: specifier: ^5.4.1 - version: 5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)) + version: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) vite-plugin-pages: specifier: ^0.32.3 - version: 0.32.3(react-router@6.26.1(react@18.3.1))(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 0.32.3(react-router@6.26.1(react@18.3.1))(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) vite-plugin-prismjs: specifier: ^0.0.11 version: 0.0.11(prismjs@1.29.0) vite-plugin-webfont-dl: specifier: ^3.9.5 - version: 3.9.5(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 3.9.5(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) vite-tsconfig-paths: specifier: ^5.0.1 - version: 5.0.1(typescript@5.5.4)(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 5.0.1(typescript@5.5.4)(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) packages: @@ -282,14 +282,6 @@ packages: resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} engines: {node: '>=6.9.0'} - '@babel/generator@7.24.10': - resolution: {integrity: sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==} - engines: {node: '>=6.9.0'} - - '@babel/generator@7.24.7': - resolution: {integrity: sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==} - engines: {node: '>=6.9.0'} - '@babel/generator@7.25.0': resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==} engines: {node: '>=6.9.0'} @@ -320,8 +312,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-plugin-utils@7.24.7': - resolution: {integrity: sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==} + '@babel/helper-plugin-utils@7.24.8': + resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} engines: {node: '>=6.9.0'} '@babel/helper-simple-access@7.24.7': @@ -332,10 +324,6 @@ packages: resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.7': - resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.8': resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} @@ -356,16 +344,6 @@ packages: resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.7': - resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/parser@7.24.8': - resolution: {integrity: sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==} - engines: {node: '>=6.0.0'} - hasBin: true - '@babel/parser@7.25.3': resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==} engines: {node: '>=6.0.0'} @@ -383,22 +361,10 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/runtime@7.24.7': - resolution: {integrity: sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==} - engines: {node: '>=6.9.0'} - - '@babel/runtime@7.24.8': - resolution: {integrity: sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==} - engines: {node: '>=6.9.0'} - '@babel/runtime@7.25.0': resolution: {integrity: sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==} engines: {node: '>=6.9.0'} - '@babel/template@7.24.7': - resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} - engines: {node: '>=6.9.0'} - '@babel/template@7.25.0': resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} @@ -407,10 +373,6 @@ packages: resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.24.8': - resolution: {integrity: sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==} - engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.3': resolution: {integrity: sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==} engines: {node: '>=6.9.0'} @@ -419,14 +381,6 @@ packages: resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.7': - resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} - engines: {node: '>=6.9.0'} - - '@babel/types@7.24.9': - resolution: {integrity: sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==} - engines: {node: '>=6.9.0'} - '@babel/types@7.25.2': resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} engines: {node: '>=6.9.0'} @@ -434,9 +388,6 @@ packages: '@emotion/babel-plugin@11.12.0': resolution: {integrity: sha512-y2WQb+oP8Jqvvclh8Q55gLUyb7UFvgv7eJfsj7td5TToBrIUtPay2kMrZi4xjq9qw2vD0ZR5fSho0yqoFgX7Rw==} - '@emotion/cache@11.13.0': - resolution: {integrity: sha512-hPV345J/tH0Cwk2wnU/3PBzORQ9HeX+kQSbwI+jslzpRCHE6fSGTohswksA/Ensr8znPzwfzKZCmAM9Lmlhp7g==} - '@emotion/cache@11.13.1': resolution: {integrity: sha512-iqouYkuEblRcXmylXIwwOodiEK5Ifl7JcX7o6V4jI3iW4mLXX3dmt5xwBtIkJiQEXFAI+pC8X0i67yiPkH9Ucw==} @@ -638,6 +589,7 @@ packages: '@eslint/js@10.0.0': resolution: {integrity: sha512-J2VKrn6YUBegZFzRQVOVA8jk7VViV/MXhQUvXuCUK1I2RGGT2E+bmNGOsgtdO9Wo25Kd3hfZFuCm8LcfsUFV7g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + deprecated: This version should not be used. '@eslint/js@9.9.0': resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} @@ -691,8 +643,8 @@ packages: resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} engines: {node: '>=6.0.0'} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -978,8 +930,8 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} - '@types/eslint@8.56.10': - resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==} + '@types/eslint@9.6.0': + resolution: {integrity: sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==} '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -993,8 +945,8 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - '@types/node@22.3.0': - resolution: {integrity: sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g==} + '@types/node@22.4.0': + resolution: {integrity: sha512-49AbMDwYUz7EXxKU/r7mXOsxwFr4BYbvB7tWYxVuLdb2ibd30ijjXINSMAHiEEZk5PCRBmW1gUeisn2VMKt3cQ==} '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -1173,8 +1125,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.23.2: - resolution: {integrity: sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==} + browserslist@4.23.3: + resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -1193,8 +1145,8 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - caniuse-lite@1.0.30001645: - resolution: {integrity: sha512-GFtY2+qt91kzyMk6j48dJcwJVq5uTkk71XxE3RtScx7XWRLsO7bU44LOFkOZYR8w9YMS0UhPSYpN/6rAMImmLw==} + caniuse-lite@1.0.30001651: + resolution: {integrity: sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==} chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} @@ -1208,8 +1160,8 @@ packages: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} - chroma-js@2.6.1-0: - resolution: {integrity: sha512-5Mzg0TdSMQtpgkQmAAcW7O62owRhwwENrK/T/fLtXuIKQar7EYyzN3YjiCN9FafZIcBBxIITp5r5fP9kybPE7g==} + chroma-js@2.6.0: + resolution: {integrity: sha512-BLHvCB9s8Z1EV4ethr6xnkl/P2YRFOGqfgvuMG/MyCbZPrTA+NeiByY6XvgF0zP4/2deU2CXnWyMa3zu1LqQ3A==} clean-css@5.3.3: resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} @@ -1299,15 +1251,6 @@ packages: dayjs@1.11.12: resolution: {integrity: sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==} - debug@4.3.5: - resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.3.6: resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} engines: {node: '>=6.0'} @@ -1382,8 +1325,8 @@ packages: echarts@5.5.1: resolution: {integrity: sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==} - electron-to-chromium@1.5.4: - resolution: {integrity: sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA==} + electron-to-chromium@1.5.10: + resolution: {integrity: sha512-C3RDERDjrNW262GCRvpoer3a0Ksd66CtgDLxMHhzShQ8fhL4kwnpVXsJPAKg9xJjIROXUbLBrvtOzVAjALMIWA==} embla-carousel-autoplay@8.1.8: resolution: {integrity: sha512-H3vVKt4HR2PGeMlCutE3+a8wv7Jq1rg31Fjb8ZDZaiuSnT/1XTwA83KpkJ02BdImVJci9RS0uEBiXBax2kfnMQ==} @@ -1762,12 +1705,8 @@ packages: i18next-browser-languagedetector@8.0.0: resolution: {integrity: sha512-zhXdJXTTCoG39QsrOCiOabnWj2jecouOqbchu3EfhtSHxIB5Uugnm9JaizenOy39h7ne3+fLikIjeW88+rgszw==} - i18next@23.12.6: - resolution: {integrity: sha512-dhvsB9zXgcWfaLHMmiHcwtMm1ZHrG0bOtECsijvFvWU5XUHrSeeoAhGCQMLC0fwXzvXvZ04ZlMkcHPu52DViGA==} - - ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} - engines: {node: '>= 4'} + i18next@23.13.0: + resolution: {integrity: sha512-B+g0/KTKmN3+NeMKPljQxdrih6Q6lyDF5O2e/Ofd0JQsTLojJD/BSTTN04iw6OVc0yBiHeypu5hoBNV6ag44Zw==} ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} @@ -2211,8 +2150,8 @@ packages: peerDependencies: postcss: '>=8.0.0' - postcss-selector-parser@6.1.1: - resolution: {integrity: sha512-b4dlw/9V8A71rLIDsSwVmak9z2DuBUB7CA1/wSdelNEzqsjoSPeADTWNO09lpH49Diy3/JIZ2bSPB1dI3LJCHg==} + postcss-selector-parser@6.1.2: + resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} engines: {node: '>=4'} postcss-simple-vars@7.0.1: @@ -2445,8 +2384,8 @@ packages: engines: {node: '>=10'} hasBin: true - set-cookie-parser@2.6.0: - resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} + set-cookie-parser@2.7.0: + resolution: {integrity: sha512-lXLOiqpkUumhRdFF3k1osNXCy9akgx/dyPZ5p8qAg9seJzXr5ZrlqZuWIMuY6ejOsVLE6flJ5/h3lsn57fQ/PQ==} set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} @@ -2641,8 +2580,8 @@ packages: resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} engines: {node: '>=14.16'} - type-fest@4.24.0: - resolution: {integrity: sha512-spAaHzc6qre0TlZQQ2aA/nGMe+2Z/wyGk5Z+Ru2VUfdNwT6kWO6TjevOlpebsATEG1EIQ2sOiDszud3lO5mt/Q==} + type-fest@4.25.0: + resolution: {integrity: sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==} engines: {node: '>=16'} typed-array-buffer@1.0.2: @@ -2666,14 +2605,14 @@ packages: engines: {node: '>=14.17'} hasBin: true - ufo@1.5.3: - resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - undici-types@6.18.2: - resolution: {integrity: sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ==} + undici-types@6.19.6: + resolution: {integrity: sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org==} unicode-emoji-modifier-base@1.0.0: resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} @@ -2832,8 +2771,8 @@ packages: which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - which-builtin-type@1.1.3: - resolution: {integrity: sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==} + which-builtin-type@1.1.4: + resolution: {integrity: sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==} engines: {node: '>= 0.4'} which-collection@1.0.2: @@ -2880,8 +2819,8 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - yaml@2.4.5: - resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} + yaml@2.5.0: + resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==} engines: {node: '>= 14'} hasBin: true @@ -2948,20 +2887,6 @@ snapshots: jsesc: 2.5.2 source-map: 0.5.7 - '@babel/generator@7.24.10': - dependencies: - '@babel/types': 7.24.9 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 - - '@babel/generator@7.24.7': - dependencies: - '@babel/types': 7.24.7 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 - '@babel/generator@7.25.0': dependencies: '@babel/types': 7.25.2 @@ -2973,27 +2898,27 @@ snapshots: dependencies: '@babel/compat-data': 7.25.2 '@babel/helper-validator-option': 7.24.8 - browserslist: 4.23.2 + browserslist: 4.23.3 lru-cache: 5.1.1 semver: 6.3.1 '@babel/helper-environment-visitor@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@babel/helper-function-name@7.24.7': dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.7 + '@babel/template': 7.25.0 + '@babel/types': 7.25.2 '@babel/helper-hoist-variables@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@babel/helper-module-imports@7.24.7': dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.9 + '@babel/traverse': 7.25.3 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color @@ -3007,7 +2932,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-plugin-utils@7.24.7': {} + '@babel/helper-plugin-utils@7.24.8': {} '@babel/helper-simple-access@7.24.7': dependencies: @@ -3018,9 +2943,7 @@ snapshots: '@babel/helper-split-export-declaration@7.24.7': dependencies: - '@babel/types': 7.24.7 - - '@babel/helper-string-parser@7.24.7': {} + '@babel/types': 7.25.2 '@babel/helper-string-parser@7.24.8': {} @@ -3040,14 +2963,6 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.0.1 - '@babel/parser@7.24.7': - dependencies: - '@babel/types': 7.17.0 - - '@babel/parser@7.24.8': - dependencies: - '@babel/types': 7.24.9 - '@babel/parser@7.25.3': dependencies: '@babel/types': 7.25.2 @@ -3055,31 +2970,17 @@ snapshots: '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-react-jsx-source@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.7 - - '@babel/runtime@7.24.7': - dependencies: - regenerator-runtime: 0.14.1 - - '@babel/runtime@7.24.8': - dependencies: - regenerator-runtime: 0.14.1 + '@babel/helper-plugin-utils': 7.24.8 '@babel/runtime@7.25.0': dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.24.7': - dependencies: - '@babel/code-frame': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 - '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 @@ -3089,28 +2990,13 @@ snapshots: '@babel/traverse@7.23.2': dependencies: '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.7 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-function-name': 7.24.7 - '@babel/helper-hoist-variables': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 - debug: 4.3.5 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - '@babel/traverse@7.24.8': - dependencies: - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.10 + '@babel/generator': 7.25.0 '@babel/helper-environment-visitor': 7.24.7 '@babel/helper-function-name': 7.24.7 '@babel/helper-hoist-variables': 7.24.7 '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.24.8 - '@babel/types': 7.24.9 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: @@ -3133,18 +3019,6 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 - '@babel/types@7.24.7': - dependencies: - '@babel/helper-string-parser': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 - to-fast-properties: 2.0.0 - - '@babel/types@7.24.9': - dependencies: - '@babel/helper-string-parser': 7.24.8 - '@babel/helper-validator-identifier': 7.24.7 - to-fast-properties: 2.0.0 - '@babel/types@7.25.2': dependencies: '@babel/helper-string-parser': 7.24.8 @@ -3154,7 +3028,7 @@ snapshots: '@emotion/babel-plugin@11.12.0': dependencies: '@babel/helper-module-imports': 7.24.7 - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 '@emotion/hash': 0.9.2 '@emotion/memoize': 0.9.0 '@emotion/serialize': 1.3.0 @@ -3167,14 +3041,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@emotion/cache@11.13.0': - dependencies: - '@emotion/memoize': 0.9.0 - '@emotion/sheet': 1.4.0 - '@emotion/utils': 1.4.0 - '@emotion/weak-memoize': 0.4.0 - stylis: 4.2.0 - '@emotion/cache@11.13.1': dependencies: '@emotion/memoize': 0.9.0 @@ -3189,9 +3055,9 @@ snapshots: '@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 '@emotion/babel-plugin': 11.12.0 - '@emotion/cache': 11.13.0 + '@emotion/cache': 11.13.1 '@emotion/serialize': 1.3.0 '@emotion/use-insertion-effect-with-fallbacks': 1.1.0(react@18.3.1) '@emotion/utils': 1.4.0 @@ -3315,7 +3181,7 @@ snapshots: debug: 4.3.6 espree: 10.1.0 globals: 14.0.0 - ignore: 5.3.1 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -3363,26 +3229,26 @@ snapshots: '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/set-array@1.2.1': {} - '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 - '@kainstar/vite-plugin-i18next-loader@1.0.3(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)))': + '@kainstar/vite-plugin-i18next-loader@1.0.3(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)))': dependencies: dot-prop: 8.0.2 globby: 14.0.2 js-yaml: 4.1.0 - vite: 5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) '@mantine/carousel@7.12.1(@mantine/core@7.12.1(@mantine/hooks@7.12.1(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.1(react@18.3.1))(embla-carousel-react@8.1.8(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -3392,9 +3258,9 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@mantine/colors-generator@7.12.1(chroma-js@2.6.1-0)': + '@mantine/colors-generator@7.12.1(chroma-js@2.6.0)': dependencies: - chroma-js: 2.6.1-0 + chroma-js: 2.6.0 '@mantine/core@7.12.1(@mantine/hooks@7.12.1(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -3406,7 +3272,7 @@ snapshots: react-number-format: 5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-remove-scroll: 2.5.10(@types/react@18.3.3)(react@18.3.1) react-textarea-autosize: 8.5.3(@types/react@18.3.3)(react@18.3.1) - type-fest: 4.24.0 + type-fest: 4.25.0 transitivePeerDependencies: - '@types/react' @@ -3494,13 +3360,13 @@ snapshots: - encoding - utf-8-validate - '@nabla/vite-plugin-eslint@2.0.4(eslint@9.9.0)(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)))': + '@nabla/vite-plugin-eslint@2.0.4(eslint@9.9.0)(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)))': dependencies: - '@types/eslint': 8.56.10 + '@types/eslint': 9.6.0 chalk: 4.1.2 - debug: 4.3.5 + debug: 4.3.6 eslint: 9.9.0 - vite: 5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) transitivePeerDependencies: - supports-color @@ -3601,7 +3467,7 @@ snapshots: '@trivago/prettier-plugin-sort-imports@4.3.0(prettier@3.3.3)': dependencies: '@babel/generator': 7.17.7 - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.3 '@babel/traverse': 7.23.2 '@babel/types': 7.17.0 javascript-natural-sort: 0.7.1 @@ -3612,24 +3478,24 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.24.8 - '@babel/types': 7.24.9 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.24.9 + '@babel/types': 7.25.2 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.24.8 - '@babel/types': 7.24.9 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.24.9 + '@babel/types': 7.25.2 '@types/chroma-js@2.4.4': {} @@ -3637,7 +3503,7 @@ snapshots: dependencies: '@types/ms': 0.7.34 - '@types/eslint@8.56.10': + '@types/eslint@9.6.0': dependencies: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 @@ -3650,9 +3516,9 @@ snapshots: '@types/ms@0.7.34': {} - '@types/node@22.3.0': + '@types/node@22.4.0': dependencies: - undici-types: 6.18.2 + undici-types: 6.19.6 '@types/parse-json@4.0.2': {} @@ -3752,14 +3618,14 @@ snapshots: '@typescript-eslint/types': 8.1.0 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-react@4.3.1(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)))': + '@vitejs/plugin-react@4.3.1(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)))': dependencies: '@babel/core': 7.25.2 '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) transitivePeerDependencies: - supports-color @@ -3866,7 +3732,7 @@ snapshots: babel-plugin-macros@3.1.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.0 cosmiconfig: 7.1.0 resolve: 1.22.8 @@ -3889,12 +3755,12 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.23.2: + browserslist@4.23.3: dependencies: - caniuse-lite: 1.0.30001645 - electron-to-chromium: 1.5.4 + caniuse-lite: 1.0.30001651 + electron-to-chromium: 1.5.10 node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.2) + update-browserslist-db: 1.1.0(browserslist@4.23.3) call-bind@1.0.7: dependencies: @@ -3910,7 +3776,7 @@ snapshots: camelcase-css@2.0.1: {} - caniuse-lite@1.0.30001645: {} + caniuse-lite@1.0.30001651: {} chalk@2.4.2: dependencies: @@ -3925,7 +3791,7 @@ snapshots: char-regex@1.0.2: {} - chroma-js@2.6.1-0: {} + chroma-js@2.6.0: {} clean-css@5.3.3: dependencies: @@ -4014,10 +3880,6 @@ snapshots: dayjs@1.11.12: {} - debug@4.3.5: - dependencies: - ms: 2.1.2 - debug@4.3.6: dependencies: ms: 2.1.2 @@ -4094,7 +3956,7 @@ snapshots: tslib: 2.3.0 zrender: 5.6.0 - electron-to-chromium@1.5.4: {} + electron-to-chromium@1.5.10: {} embla-carousel-autoplay@8.1.8(embla-carousel@8.1.8): dependencies: @@ -4320,7 +4182,7 @@ snapshots: file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - ignore: 5.3.1 + ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -4394,7 +4256,7 @@ snapshots: fetch-cookie@2.2.0: dependencies: - set-cookie-parser: 2.6.0 + set-cookie-parser: 2.7.0 tough-cookie: 4.1.4 file-entry-cache@8.0.0: @@ -4502,7 +4364,7 @@ snapshots: dependencies: '@sindresorhus/merge-streams': 2.3.0 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 path-type: 5.0.0 slash: 5.1.0 unicorn-magic: 0.1.0 @@ -4571,14 +4433,12 @@ snapshots: i18next-browser-languagedetector@8.0.0: dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.0 - i18next@23.12.6: + i18next@23.13.0: dependencies: '@babel/runtime': 7.25.0 - ignore@5.3.1: {} - ignore@5.3.2: {} import-fresh@3.3.0: @@ -4815,7 +4675,7 @@ snapshots: acorn: 8.12.1 pathe: 1.1.2 pkg-types: 1.1.3 - ufo: 1.5.3 + ufo: 1.5.4 ms@2.1.2: {} @@ -4996,7 +4856,7 @@ snapshots: postcss-nested@6.2.0(postcss@8.4.41): dependencies: postcss: 8.4.41 - postcss-selector-parser: 6.1.1 + postcss-selector-parser: 6.1.2 postcss-preset-mantine@1.17.0(postcss@8.4.41): dependencies: @@ -5004,7 +4864,7 @@ snapshots: postcss-mixins: 9.0.4(postcss@8.4.41) postcss-nested: 6.2.0(postcss@8.4.41) - postcss-selector-parser@6.1.1: + postcss-selector-parser@6.1.2: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 @@ -5054,7 +4914,7 @@ snapshots: react-error-boundary@4.0.13(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.0 react: 18.3.1 react-google-recaptcha-v3@1.10.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): @@ -5063,11 +4923,11 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-i18next@15.0.1(i18next@23.12.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + react-i18next@15.0.1(i18next@23.13.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.0 html-parse-stringify: 3.0.1 - i18next: 23.12.6 + i18next: 23.13.0 react: 18.3.1 optionalDependencies: react-dom: 18.3.1(react@18.3.1) @@ -5169,7 +5029,7 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.4 globalthis: 1.0.4 - which-builtin-type: 1.1.3 + which-builtin-type: 1.1.4 reftools@1.1.9: {} @@ -5251,7 +5111,7 @@ snapshots: semver@7.6.3: {} - set-cookie-parser@2.6.0: {} + set-cookie-parser@2.7.0: {} set-function-length@1.2.2: dependencies: @@ -5479,7 +5339,7 @@ snapshots: type-fest@3.13.1: {} - type-fest@4.24.0: {} + type-fest@4.25.0: {} typed-array-buffer@1.0.2: dependencies: @@ -5515,7 +5375,7 @@ snapshots: typescript@5.5.4: {} - ufo@1.5.3: {} + ufo@1.5.4: {} unbox-primitive@1.0.2: dependencies: @@ -5524,7 +5384,7 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - undici-types@6.18.2: {} + undici-types@6.19.6: {} unicode-emoji-modifier-base@1.0.0: {} @@ -5532,9 +5392,9 @@ snapshots: universalify@0.2.0: {} - update-browserslist-db@1.1.0(browserslist@4.23.2): + update-browserslist-db@1.1.0(browserslist@4.23.3): dependencies: - browserslist: 4.23.2 + browserslist: 4.23.3 escalade: 3.1.2 picocolors: 1.0.1 @@ -5585,18 +5445,18 @@ snapshots: util-deprecate@1.0.2: {} - vite-plugin-pages@0.32.3(react-router@6.26.1(react@18.3.1))(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41))): + vite-plugin-pages@0.32.3(react-router@6.26.1(react@18.3.1))(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))): dependencies: '@types/debug': 4.1.12 - debug: 4.3.5 + debug: 4.3.6 dequal: 2.0.3 extract-comments: 1.1.0 fast-glob: 3.3.2 json5: 2.2.3 local-pkg: 0.5.0 picocolors: 1.0.1 - vite: 5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)) - yaml: 2.4.5 + vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) + yaml: 2.5.0 optionalDependencies: react-router: 6.26.1(react@18.3.1) transitivePeerDependencies: @@ -5610,34 +5470,34 @@ snapshots: - prismjs - supports-color - vite-plugin-webfont-dl@3.9.5(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41))): + vite-plugin-webfont-dl@3.9.5(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))): dependencies: axios: 1.7.4 clean-css: 5.3.3 flat-cache: 5.0.0 picocolors: 1.0.1 - vite: 5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) transitivePeerDependencies: - debug - vite-tsconfig-paths@5.0.1(typescript@5.5.4)(vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41))): + vite-tsconfig-paths@5.0.1(typescript@5.5.4)(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))): dependencies: debug: 4.3.6 globrex: 0.1.2 tsconfck: 3.1.1(typescript@5.5.4) optionalDependencies: - vite: 5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) transitivePeerDependencies: - supports-color - typescript - vite@5.4.1(@types/node@22.3.0)(sugarss@4.0.1(postcss@8.4.41)): + vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)): dependencies: esbuild: 0.21.5 postcss: 8.4.41 rollup: 4.20.0 optionalDependencies: - '@types/node': 22.3.0 + '@types/node': 22.4.0 fsevents: 2.3.3 sugarss: 4.0.1(postcss@8.4.41) @@ -5662,7 +5522,7 @@ snapshots: is-string: 1.0.7 is-symbol: 1.0.4 - which-builtin-type@1.1.3: + which-builtin-type@1.1.4: dependencies: function.prototype.name: 1.1.6 has-tostringtag: 1.0.2 @@ -5712,7 +5572,7 @@ snapshots: yaml@1.10.2: {} - yaml@2.4.5: {} + yaml@2.5.0: {} yargs-parser@21.1.1: {} diff --git a/src/GZCTF/GZCTF.csproj b/src/GZCTF/GZCTF.csproj index 0f2b44ae6..4e78c347e 100644 --- a/src/GZCTF/GZCTF.csproj +++ b/src/GZCTF/GZCTF.csproj @@ -2,7 +2,7 @@ net8.0 - 0.21.2.0 + 0.21.3.0 GZ::CTF $(VITE_APP_GIT_NAME)-$(VITE_APP_GIT_SHA) build at $(VITE_APP_BUILD_TIMESTAMP) enable enable @@ -18,7 +18,7 @@ http://localhost:63000 npm run dev -- --host Debug;Release - 0.21.2 + 0.21.3 4 true 1 From 985fe1712cb07f94c273066236b4bbe46df401f3 Mon Sep 17 00:00:00 2001 From: Kengwang Date: Mon, 19 Aug 2024 01:46:28 +0800 Subject: [PATCH 3/6] fix(monitor/submission): wrong dependence for useEffect (#321) --- .../ClientApp/src/pages/games/[id]/monitor/Submissions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GZCTF/ClientApp/src/pages/games/[id]/monitor/Submissions.tsx b/src/GZCTF/ClientApp/src/pages/games/[id]/monitor/Submissions.tsx index 5255077c2..7e2736ee1 100644 --- a/src/GZCTF/ClientApp/src/pages/games/[id]/monitor/Submissions.tsx +++ b/src/GZCTF/ClientApp/src/pages/games/[id]/monitor/Submissions.tsx @@ -157,7 +157,7 @@ const Submissions: FC = () => { }) } } - }) + }, [game, numId, t]) const filteredSubs = newSubmissions.current.filter( (item) => type === 'All' || item.status === type From 62b0f5424eb2351aa5d1cc8dea06f8f52f164174 Mon Sep 17 00:00:00 2001 From: GZTime Date: Mon, 19 Aug 2024 22:01:47 +0800 Subject: [PATCH 4/6] fix(challenge): mutate on instance update --- src/GZCTF/ClientApp/package.json | 6 +- src/GZCTF/ClientApp/pnpm-lock.yaml | 208 +++++++++--------- .../src/components/GameChallengeModal.tsx | 52 +++-- .../src/components/InstanceEntry.tsx | 4 +- 4 files changed, 137 insertions(+), 133 deletions(-) diff --git a/src/GZCTF/ClientApp/package.json b/src/GZCTF/ClientApp/package.json index 907983671..33c8f0b2a 100644 --- a/src/GZCTF/ClientApp/package.json +++ b/src/GZCTF/ClientApp/package.json @@ -36,7 +36,7 @@ "embla-carousel": "^8.1.8", "embla-carousel-autoplay": "^8.1.8", "embla-carousel-react": "^8.1.8", - "i18next": "^23.13.0", + "i18next": "^23.14.0", "i18next-browser-languagedetector": "^8.0.0", "katex": "^0.16.11", "lz-string": "^1.5.0", @@ -64,7 +64,7 @@ "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/chroma-js": "^2.4.4", "@types/katex": "^0.16.7", - "@types/node": "22.4.0", + "@types/node": "22.4.1", "@types/prismjs": "^1.26.4", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", @@ -85,7 +85,7 @@ "postcss-preset-mantine": "^1.17.0", "postcss-simple-vars": "^7.0.1", "prettier": "~3.3.3", - "rollup": "^4.20.0", + "rollup": "^4.21.0", "swagger-typescript-api": "^13.0.21", "tslib": "^2.6.3", "typescript": "5.5.4", diff --git a/src/GZCTF/ClientApp/pnpm-lock.yaml b/src/GZCTF/ClientApp/pnpm-lock.yaml index 7e013e471..2fe48e12f 100644 --- a/src/GZCTF/ClientApp/pnpm-lock.yaml +++ b/src/GZCTF/ClientApp/pnpm-lock.yaml @@ -84,8 +84,8 @@ importers: specifier: ^8.1.8 version: 8.1.8(react@18.3.1) i18next: - specifier: ^23.13.0 - version: 23.13.0 + specifier: ^23.14.0 + version: 23.14.0 i18next-browser-languagedetector: specifier: ^8.0.0 version: 8.0.0 @@ -121,7 +121,7 @@ importers: version: 1.10.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-i18next: specifier: ^15.0.1 - version: 15.0.1(i18next@23.13.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 15.0.1(i18next@23.14.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-pdf: specifier: ^9.1.0 version: 9.1.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -149,10 +149,10 @@ importers: version: 10.0.0 '@kainstar/vite-plugin-i18next-loader': specifier: ^1.0.3 - version: 1.0.3(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 1.0.3(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41))) '@nabla/vite-plugin-eslint': specifier: ^2.0.4 - version: 2.0.4(eslint@9.9.0)(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 2.0.4(eslint@9.9.0)(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41))) '@trivago/prettier-plugin-sort-imports': specifier: ^4.3.0 version: 4.3.0(prettier@3.3.3) @@ -163,8 +163,8 @@ importers: specifier: ^0.16.7 version: 0.16.7 '@types/node': - specifier: 22.4.0 - version: 22.4.0 + specifier: 22.4.1 + version: 22.4.1 '@types/prismjs': specifier: ^1.26.4 version: 1.26.4 @@ -182,7 +182,7 @@ importers: version: 8.1.0(eslint@9.9.0)(typescript@5.5.4) '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 4.3.1(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41))) axios: specifier: ^1.7.4 version: 1.7.4 @@ -226,8 +226,8 @@ importers: specifier: ~3.3.3 version: 3.3.3 rollup: - specifier: ^4.20.0 - version: 4.20.0 + specifier: ^4.21.0 + version: 4.21.0 swagger-typescript-api: specifier: ^13.0.21 version: 13.0.21 @@ -239,19 +239,19 @@ importers: version: 5.5.4 vite: specifier: ^5.4.1 - version: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) + version: 5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)) vite-plugin-pages: specifier: ^0.32.3 - version: 0.32.3(react-router@6.26.1(react@18.3.1))(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 0.32.3(react-router@6.26.1(react@18.3.1))(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41))) vite-plugin-prismjs: specifier: ^0.0.11 version: 0.0.11(prismjs@1.29.0) vite-plugin-webfont-dl: specifier: ^3.9.5 - version: 3.9.5(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 3.9.5(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41))) vite-tsconfig-paths: specifier: ^5.0.1 - version: 5.0.1(typescript@5.5.4)(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))) + version: 5.0.1(typescript@5.5.4)(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41))) packages: @@ -815,83 +815,83 @@ packages: resolution: {integrity: sha512-S45oynt/WH19bHbIXjtli6QmwNYvaz+vtnubvNpNDvUOoA/OWh6j1OikIP3G+v5GHdxyC6EXoChG3HgYGEUfcg==} engines: {node: '>=14.0.0'} - '@rollup/rollup-android-arm-eabi@4.20.0': - resolution: {integrity: sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==} + '@rollup/rollup-android-arm-eabi@4.21.0': + resolution: {integrity: sha512-WTWD8PfoSAJ+qL87lE7votj3syLavxunWhzCnx3XFxFiI/BA/r3X7MUM8dVrH8rb2r4AiO8jJsr3ZjdaftmnfA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.20.0': - resolution: {integrity: sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==} + '@rollup/rollup-android-arm64@4.21.0': + resolution: {integrity: sha512-a1sR2zSK1B4eYkiZu17ZUZhmUQcKjk2/j9Me2IDjk1GHW7LB5Z35LEzj9iJch6gtUfsnvZs1ZNyDW2oZSThrkA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.20.0': - resolution: {integrity: sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==} + '@rollup/rollup-darwin-arm64@4.21.0': + resolution: {integrity: sha512-zOnKWLgDld/svhKO5PD9ozmL6roy5OQ5T4ThvdYZLpiOhEGY+dp2NwUmxK0Ld91LrbjrvtNAE0ERBwjqhZTRAA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.20.0': - resolution: {integrity: sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==} + '@rollup/rollup-darwin-x64@4.21.0': + resolution: {integrity: sha512-7doS8br0xAkg48SKE2QNtMSFPFUlRdw9+votl27MvT46vo44ATBmdZdGysOevNELmZlfd+NEa0UYOA8f01WSrg==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.20.0': - resolution: {integrity: sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==} + '@rollup/rollup-linux-arm-gnueabihf@4.21.0': + resolution: {integrity: sha512-pWJsfQjNWNGsoCq53KjMtwdJDmh/6NubwQcz52aEwLEuvx08bzcy6tOUuawAOncPnxz/3siRtd8hiQ32G1y8VA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.20.0': - resolution: {integrity: sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==} + '@rollup/rollup-linux-arm-musleabihf@4.21.0': + resolution: {integrity: sha512-efRIANsz3UHZrnZXuEvxS9LoCOWMGD1rweciD6uJQIx2myN3a8Im1FafZBzh7zk1RJ6oKcR16dU3UPldaKd83w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.20.0': - resolution: {integrity: sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==} + '@rollup/rollup-linux-arm64-gnu@4.21.0': + resolution: {integrity: sha512-ZrPhydkTVhyeGTW94WJ8pnl1uroqVHM3j3hjdquwAcWnmivjAwOYjTEAuEDeJvGX7xv3Z9GAvrBkEzCgHq9U1w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.20.0': - resolution: {integrity: sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==} + '@rollup/rollup-linux-arm64-musl@4.21.0': + resolution: {integrity: sha512-cfaupqd+UEFeURmqNP2eEvXqgbSox/LHOyN9/d2pSdV8xTrjdg3NgOFJCtc1vQ/jEke1qD0IejbBfxleBPHnPw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.20.0': - resolution: {integrity: sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.21.0': + resolution: {integrity: sha512-ZKPan1/RvAhrUylwBXC9t7B2hXdpb/ufeu22pG2psV7RN8roOfGurEghw1ySmX/CmDDHNTDDjY3lo9hRlgtaHg==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.20.0': - resolution: {integrity: sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==} + '@rollup/rollup-linux-riscv64-gnu@4.21.0': + resolution: {integrity: sha512-H1eRaCwd5E8eS8leiS+o/NqMdljkcb1d6r2h4fKSsCXQilLKArq6WS7XBLDu80Yz+nMqHVFDquwcVrQmGr28rg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.20.0': - resolution: {integrity: sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==} + '@rollup/rollup-linux-s390x-gnu@4.21.0': + resolution: {integrity: sha512-zJ4hA+3b5tu8u7L58CCSI0A9N1vkfwPhWd/puGXwtZlsB5bTkwDNW/+JCU84+3QYmKpLi+XvHdmrlwUwDA6kqw==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.20.0': - resolution: {integrity: sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==} + '@rollup/rollup-linux-x64-gnu@4.21.0': + resolution: {integrity: sha512-e2hrvElFIh6kW/UNBQK/kzqMNY5mO+67YtEh9OA65RM5IJXYTWiXjX6fjIiPaqOkBthYF1EqgiZ6OXKcQsM0hg==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.20.0': - resolution: {integrity: sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==} + '@rollup/rollup-linux-x64-musl@4.21.0': + resolution: {integrity: sha512-1vvmgDdUSebVGXWX2lIcgRebqfQSff0hMEkLJyakQ9JQUbLDkEaMsPTLOmyccyC6IJ/l3FZuJbmrBw/u0A0uCQ==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.20.0': - resolution: {integrity: sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==} + '@rollup/rollup-win32-arm64-msvc@4.21.0': + resolution: {integrity: sha512-s5oFkZ/hFcrlAyBTONFY1TWndfyre1wOMwU+6KCpm/iatybvrRgmZVM+vCFwxmC5ZhdlgfE0N4XorsDpi7/4XQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.20.0': - resolution: {integrity: sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==} + '@rollup/rollup-win32-ia32-msvc@4.21.0': + resolution: {integrity: sha512-G9+TEqRnAA6nbpqyUqgTiopmnfgnMkR3kMukFBDsiyy23LZvUCpiUwjTRx6ezYCjJODXrh52rBR9oXvm+Fp5wg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.20.0': - resolution: {integrity: sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==} + '@rollup/rollup-win32-x64-msvc@4.21.0': + resolution: {integrity: sha512-2jsCDZwtQvRhejHLfZ1JY6w6kEuEtfF9nzYsZxzSlNVKDX+DpsDJ+Rbjkm74nvg2rdx0gwBS+IMdvwJuq3S9pQ==} cpu: [x64] os: [win32] @@ -945,8 +945,8 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - '@types/node@22.4.0': - resolution: {integrity: sha512-49AbMDwYUz7EXxKU/r7mXOsxwFr4BYbvB7tWYxVuLdb2ibd30ijjXINSMAHiEEZk5PCRBmW1gUeisn2VMKt3cQ==} + '@types/node@22.4.1': + resolution: {integrity: sha512-1tbpb9325+gPnKK0dMm+/LMriX0vKxf6RnB0SZUqfyVkQ4fMgUSySqhxE/y8Jvs4NyF1yHzTfG9KlnkIODxPKg==} '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -1705,8 +1705,8 @@ packages: i18next-browser-languagedetector@8.0.0: resolution: {integrity: sha512-zhXdJXTTCoG39QsrOCiOabnWj2jecouOqbchu3EfhtSHxIB5Uugnm9JaizenOy39h7ne3+fLikIjeW88+rgszw==} - i18next@23.13.0: - resolution: {integrity: sha512-B+g0/KTKmN3+NeMKPljQxdrih6Q6lyDF5O2e/Ofd0JQsTLojJD/BSTTN04iw6OVc0yBiHeypu5hoBNV6ag44Zw==} + i18next@23.14.0: + resolution: {integrity: sha512-Y5GL4OdA8IU2geRrt2+Uc1iIhsjICdHZzT9tNwQ3TVqdNzgxHToGCKf/TPRP80vTCAP6svg2WbbJL+Gx5MFQVA==} ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} @@ -2353,8 +2353,8 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.20.0: - resolution: {integrity: sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==} + rollup@4.21.0: + resolution: {integrity: sha512-vo+S/lfA2lMS7rZ2Qoubi6I5hwZwzXeUIctILZLbHI+laNtvhhOIon2S1JksA5UEDQ7l3vberd0fxK44lTYjbQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3243,12 +3243,12 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@kainstar/vite-plugin-i18next-loader@1.0.3(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)))': + '@kainstar/vite-plugin-i18next-loader@1.0.3(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)))': dependencies: dot-prop: 8.0.2 globby: 14.0.2 js-yaml: 4.1.0 - vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)) '@mantine/carousel@7.12.1(@mantine/core@7.12.1(@mantine/hooks@7.12.1(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.1(react@18.3.1))(embla-carousel-react@8.1.8(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -3360,13 +3360,13 @@ snapshots: - encoding - utf-8-validate - '@nabla/vite-plugin-eslint@2.0.4(eslint@9.9.0)(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)))': + '@nabla/vite-plugin-eslint@2.0.4(eslint@9.9.0)(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)))': dependencies: '@types/eslint': 9.6.0 chalk: 4.1.2 debug: 4.3.6 eslint: 9.9.0 - vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)) transitivePeerDependencies: - supports-color @@ -3412,52 +3412,52 @@ snapshots: '@remix-run/router@1.19.1': {} - '@rollup/rollup-android-arm-eabi@4.20.0': + '@rollup/rollup-android-arm-eabi@4.21.0': optional: true - '@rollup/rollup-android-arm64@4.20.0': + '@rollup/rollup-android-arm64@4.21.0': optional: true - '@rollup/rollup-darwin-arm64@4.20.0': + '@rollup/rollup-darwin-arm64@4.21.0': optional: true - '@rollup/rollup-darwin-x64@4.20.0': + '@rollup/rollup-darwin-x64@4.21.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.20.0': + '@rollup/rollup-linux-arm-gnueabihf@4.21.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.20.0': + '@rollup/rollup-linux-arm-musleabihf@4.21.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.20.0': + '@rollup/rollup-linux-arm64-gnu@4.21.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.20.0': + '@rollup/rollup-linux-arm64-musl@4.21.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.20.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.21.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.20.0': + '@rollup/rollup-linux-riscv64-gnu@4.21.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.20.0': + '@rollup/rollup-linux-s390x-gnu@4.21.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.20.0': + '@rollup/rollup-linux-x64-gnu@4.21.0': optional: true - '@rollup/rollup-linux-x64-musl@4.20.0': + '@rollup/rollup-linux-x64-musl@4.21.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.20.0': + '@rollup/rollup-win32-arm64-msvc@4.21.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.20.0': + '@rollup/rollup-win32-ia32-msvc@4.21.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.20.0': + '@rollup/rollup-win32-x64-msvc@4.21.0': optional: true '@sindresorhus/is@4.6.0': {} @@ -3516,7 +3516,7 @@ snapshots: '@types/ms@0.7.34': {} - '@types/node@22.4.0': + '@types/node@22.4.1': dependencies: undici-types: 6.19.6 @@ -3618,14 +3618,14 @@ snapshots: '@typescript-eslint/types': 8.1.0 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-react@4.3.1(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)))': + '@vitejs/plugin-react@4.3.1(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)))': dependencies: '@babel/core': 7.25.2 '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)) transitivePeerDependencies: - supports-color @@ -4435,7 +4435,7 @@ snapshots: dependencies: '@babel/runtime': 7.25.0 - i18next@23.13.0: + i18next@23.14.0: dependencies: '@babel/runtime': 7.25.0 @@ -4923,11 +4923,11 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-i18next@15.0.1(i18next@23.13.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + react-i18next@15.0.1(i18next@23.14.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.0 html-parse-stringify: 3.0.1 - i18next: 23.13.0 + i18next: 23.14.0 react: 18.3.1 optionalDependencies: react-dom: 18.3.1(react@18.3.1) @@ -5062,26 +5062,26 @@ snapshots: reusify@1.0.4: {} - rollup@4.20.0: + rollup@4.21.0: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.20.0 - '@rollup/rollup-android-arm64': 4.20.0 - '@rollup/rollup-darwin-arm64': 4.20.0 - '@rollup/rollup-darwin-x64': 4.20.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.20.0 - '@rollup/rollup-linux-arm-musleabihf': 4.20.0 - '@rollup/rollup-linux-arm64-gnu': 4.20.0 - '@rollup/rollup-linux-arm64-musl': 4.20.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.20.0 - '@rollup/rollup-linux-riscv64-gnu': 4.20.0 - '@rollup/rollup-linux-s390x-gnu': 4.20.0 - '@rollup/rollup-linux-x64-gnu': 4.20.0 - '@rollup/rollup-linux-x64-musl': 4.20.0 - '@rollup/rollup-win32-arm64-msvc': 4.20.0 - '@rollup/rollup-win32-ia32-msvc': 4.20.0 - '@rollup/rollup-win32-x64-msvc': 4.20.0 + '@rollup/rollup-android-arm-eabi': 4.21.0 + '@rollup/rollup-android-arm64': 4.21.0 + '@rollup/rollup-darwin-arm64': 4.21.0 + '@rollup/rollup-darwin-x64': 4.21.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.21.0 + '@rollup/rollup-linux-arm-musleabihf': 4.21.0 + '@rollup/rollup-linux-arm64-gnu': 4.21.0 + '@rollup/rollup-linux-arm64-musl': 4.21.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.21.0 + '@rollup/rollup-linux-riscv64-gnu': 4.21.0 + '@rollup/rollup-linux-s390x-gnu': 4.21.0 + '@rollup/rollup-linux-x64-gnu': 4.21.0 + '@rollup/rollup-linux-x64-musl': 4.21.0 + '@rollup/rollup-win32-arm64-msvc': 4.21.0 + '@rollup/rollup-win32-ia32-msvc': 4.21.0 + '@rollup/rollup-win32-x64-msvc': 4.21.0 fsevents: 2.3.3 run-parallel@1.2.0: @@ -5445,7 +5445,7 @@ snapshots: util-deprecate@1.0.2: {} - vite-plugin-pages@0.32.3(react-router@6.26.1(react@18.3.1))(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))): + vite-plugin-pages@0.32.3(react-router@6.26.1(react@18.3.1))(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41))): dependencies: '@types/debug': 4.1.12 debug: 4.3.6 @@ -5455,7 +5455,7 @@ snapshots: json5: 2.2.3 local-pkg: 0.5.0 picocolors: 1.0.1 - vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)) yaml: 2.5.0 optionalDependencies: react-router: 6.26.1(react@18.3.1) @@ -5470,34 +5470,34 @@ snapshots: - prismjs - supports-color - vite-plugin-webfont-dl@3.9.5(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))): + vite-plugin-webfont-dl@3.9.5(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41))): dependencies: axios: 1.7.4 clean-css: 5.3.3 flat-cache: 5.0.0 picocolors: 1.0.1 - vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)) transitivePeerDependencies: - debug - vite-tsconfig-paths@5.0.1(typescript@5.5.4)(vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41))): + vite-tsconfig-paths@5.0.1(typescript@5.5.4)(vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41))): dependencies: debug: 4.3.6 globrex: 0.1.2 tsconfck: 3.1.1(typescript@5.5.4) optionalDependencies: - vite: 5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)) + vite: 5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)) transitivePeerDependencies: - supports-color - typescript - vite@5.4.1(@types/node@22.4.0)(sugarss@4.0.1(postcss@8.4.41)): + vite@5.4.1(@types/node@22.4.1)(sugarss@4.0.1(postcss@8.4.41)): dependencies: esbuild: 0.21.5 postcss: 8.4.41 - rollup: 4.20.0 + rollup: 4.21.0 optionalDependencies: - '@types/node': 22.4.0 + '@types/node': 22.4.1 fsevents: 2.3.3 sugarss: 4.0.1(postcss@8.4.41) diff --git a/src/GZCTF/ClientApp/src/components/GameChallengeModal.tsx b/src/GZCTF/ClientApp/src/components/GameChallengeModal.tsx index 9a381df00..2712f550c 100644 --- a/src/GZCTF/ClientApp/src/components/GameChallengeModal.tsx +++ b/src/GZCTF/ClientApp/src/components/GameChallengeModal.tsx @@ -8,7 +8,6 @@ import { useTranslation } from 'react-i18next' import ChallengeModal from '@Components/ChallengeModal' import { showErrorNotification } from '@Utils/ApiHelper' import { ChallengeTagItemProps } from '@Utils/Shared' -import { OnceSWRConfig } from '@Utils/useConfig' import api, { AnswerResult, ChallengeType } from '@Api' interface GameChallengeModalProps extends ModalProps { @@ -24,11 +23,9 @@ interface GameChallengeModalProps extends ModalProps { const GameChallengeModal: FC = (props) => { const { gameId, gameEnded, challengeId, tagData, solved, title, score, ...modalProps } = props - const { data: challenge, mutate } = api.game.useGameGetChallenge( - gameId, - challengeId, - OnceSWRConfig - ) + const { data: challenge, mutate } = api.game.useGameGetChallenge(gameId, challengeId, { + refreshInterval: 120 * 1000, + }) const { t } = useTranslation() @@ -72,25 +69,32 @@ const GameChallengeModal: FC = (props) => { const onDestroy = () => { if (!challengeId || disabled) return setDisabled(true) - api.game - .gameDeleteContainer(gameId, challengeId) - .then(() => { - mutate({ - ...challenge, - context: { - ...challenge?.context, - closeTime: null, - instanceEntry: null, - }, - }) - showNotification({ - color: 'teal', - title: t('challenge.notification.instance.destroyed.title'), - message: t('challenge.notification.instance.destroyed.message'), - icon: , - }) + + mutate() + .then((res) => { + // the instanceEntry is already destroyed + if (!res?.context?.instanceEntry) return + + api.game + .gameDeleteContainer(gameId, challengeId) + .then(() => { + mutate({ + ...challenge, + context: { + ...challenge?.context, + closeTime: null, + instanceEntry: null, + }, + }) + showNotification({ + color: 'teal', + title: t('challenge.notification.instance.destroyed.title'), + message: t('challenge.notification.instance.destroyed.message'), + icon: , + }) + }) + .catch((e) => showErrorNotification(e, t)) }) - .catch((e) => showErrorNotification(e, t)) .finally(() => setDisabled(false)) } diff --git a/src/GZCTF/ClientApp/src/components/InstanceEntry.tsx b/src/GZCTF/ClientApp/src/components/InstanceEntry.tsx index b2f4870f7..6398dace3 100644 --- a/src/GZCTF/ClientApp/src/components/InstanceEntry.tsx +++ b/src/GZCTF/ClientApp/src/components/InstanceEntry.tsx @@ -31,6 +31,8 @@ import { useConfig } from '@Utils/useConfig' import { ClientFlagContext } from '@Api' import tooltipClasses from '@Styles/Tooltip.module.css' +dayjs.extend(duration) + interface InstanceEntryProps { test?: boolean context: ClientFlagContext @@ -40,8 +42,6 @@ interface InstanceEntryProps { onDestroy?: () => void } -dayjs.extend(duration) - interface CountdownProps { time?: string | null onTimeout?: () => void From ce785a0892e1ce9fde9ab309218ec0f79359657d Mon Sep 17 00:00:00 2001 From: GZTime Date: Mon, 19 Aug 2024 22:57:56 +0800 Subject: [PATCH 5/6] chore: increase code reuse --- .../Container/Manager/DockerManager.cs | 20 ++------ .../Container/Manager/IContainerManager.cs | 48 ++++++++++++++++++- .../Container/Manager/KubernetesManager.cs | 28 ++--------- .../Container/Manager/SwarmManager.cs | 18 +------ 4 files changed, 55 insertions(+), 59 deletions(-) diff --git a/src/GZCTF/Services/Container/Manager/DockerManager.cs b/src/GZCTF/Services/Container/Manager/DockerManager.cs index 55084d83c..5335a1190 100644 --- a/src/GZCTF/Services/Container/Manager/DockerManager.cs +++ b/src/GZCTF/Services/Container/Manager/DockerManager.cs @@ -54,20 +54,13 @@ await _client.Containers.RemoveContainerAsync(container.ContainerId, } else { - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerDeletionFailedStatus), - container.ContainerId, - e.StatusCode], TaskStatus.Failed, LogLevel.Warning); - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerDeletionFailedResponse), - container.ContainerId, - e.ResponseBody], TaskStatus.Failed, LogLevel.Error); + _logger.LogDeletionFailedWithHttpContext(container.ContainerId, e.StatusCode, e.ResponseBody); return; } } catch (Exception e) { - _logger.LogError(e, + _logger.LogError(e, "{msg}", Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerDeletionFailed), container.ContainerId]); return; @@ -154,14 +147,7 @@ await _client.Containers.RemoveContainerAsync(parameters.Name, goto CreateDockerContainer; } - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerCreationFailedStatus), - parameters.Name, - e.StatusCode], TaskStatus.Failed, LogLevel.Warning); - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerCreationFailedResponse), - parameters.Name, - e.ResponseBody], TaskStatus.Failed, LogLevel.Error); + _logger.LogCreationFailedWithHttpContext(parameters.Name, e.StatusCode, e.ResponseBody); return null; } catch (Exception e) diff --git a/src/GZCTF/Services/Container/Manager/IContainerManager.cs b/src/GZCTF/Services/Container/Manager/IContainerManager.cs index 189c1d64b..0c39584ed 100644 --- a/src/GZCTF/Services/Container/Manager/IContainerManager.cs +++ b/src/GZCTF/Services/Container/Manager/IContainerManager.cs @@ -1,4 +1,5 @@ -using GZCTF.Models.Internal; +using System.Net; +using GZCTF.Models.Internal; namespace GZCTF.Services.Container.Manager; @@ -20,3 +21,48 @@ public interface IContainerManager /// public Task DestroyContainerAsync(Models.Data.Container container, CancellationToken token = default); } + +static class ContainerManagerLogHelper +{ + static void LogWithHttpContext( + ILogger logger, + string container, + HttpStatusCode status, + string body, + string statusLogFormatKey, + string responseLogFormatKey + ) + { + logger.SystemLog(Program.StaticLocalizer[statusLogFormatKey, container, status], + TaskStatus.Failed, LogLevel.Warning); + logger.SystemLog(Program.StaticLocalizer[responseLogFormatKey, container, body], + TaskStatus.Failed, LogLevel.Error); + } + + internal static void LogCreationFailedWithHttpContext( + this ILogger logger, + string container, + HttpStatusCode status, + string body + ) => LogWithHttpContext(logger, container, status, body, + nameof(Resources.Program.ContainerManager_ContainerCreationFailedStatus), + nameof(Resources.Program.ContainerManager_ContainerCreationFailedResponse)); + + internal static void LogDeletionFailedWithHttpContext( + this ILogger logger, + string container, + HttpStatusCode status, + string body + ) => LogWithHttpContext(logger, container, status, body, + nameof(Resources.Program.ContainerManager_ContainerDeletionFailedStatus), + nameof(Resources.Program.ContainerManager_ContainerDeletionFailedResponse)); + + internal static void LogServiceCreationFailedWithHttpContext( + this ILogger logger, + string container, + HttpStatusCode status, + string body + ) => LogWithHttpContext(logger, container, status, body, + nameof(Resources.Program.ContainerManager_ServiceCreationFailedStatus), + nameof(Resources.Program.ContainerManager_ServiceCreationFailedResponse)); +} diff --git a/src/GZCTF/Services/Container/Manager/KubernetesManager.cs b/src/GZCTF/Services/Container/Manager/KubernetesManager.cs index 6be7ba3af..a05e5afdf 100644 --- a/src/GZCTF/Services/Container/Manager/KubernetesManager.cs +++ b/src/GZCTF/Services/Container/Manager/KubernetesManager.cs @@ -119,15 +119,7 @@ config.Flag is null } catch (HttpOperationException e) { - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerCreationFailedStatus), name, - e.Response.StatusCode], - TaskStatus.Failed, LogLevel.Warning); - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerCreationFailedResponse), - name, - e.Response.Content], - TaskStatus.Failed, LogLevel.Error); + _logger.LogCreationFailedWithHttpContext(name, e.Response.StatusCode, e.Response.Content); return null; } catch (Exception e) @@ -180,14 +172,7 @@ config.Flag is null // ignored } - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ServiceCreationFailedStatus), name, - e.Response.StatusCode], - TaskStatus.Failed, LogLevel.Warning); - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ServiceCreationFailedResponse), name, - e.Response.Content], - TaskStatus.Failed, LogLevel.Error); + _logger.LogServiceCreationFailedWithHttpContext(name, e.Response.StatusCode, e.Response.Content); return null; } catch (Exception e) @@ -244,14 +229,7 @@ await _client.CoreV1.DeleteNamespacedPodAsync(container.ContainerId, _meta.Confi return; } - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerDeletionFailedStatus), - container.ContainerId, - e.Response.StatusCode], TaskStatus.Failed, LogLevel.Warning); - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerDeletionFailedResponse), - container.ContainerId, - e.Response.Content], TaskStatus.Failed, LogLevel.Error); + _logger.LogDeletionFailedWithHttpContext(container.ContainerId, e.Response.StatusCode, e.Response.Content); } catch (Exception e) { diff --git a/src/GZCTF/Services/Container/Manager/SwarmManager.cs b/src/GZCTF/Services/Container/Manager/SwarmManager.cs index dd6ca6c55..5aca5cc47 100644 --- a/src/GZCTF/Services/Container/Manager/SwarmManager.cs +++ b/src/GZCTF/Services/Container/Manager/SwarmManager.cs @@ -53,14 +53,7 @@ public async Task DestroyContainerAsync(Models.Data.Container container, Cancell } else { - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerDeletionFailedStatus), - container.ContainerId, - e.StatusCode], TaskStatus.Failed, LogLevel.Warning); - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerDeletionFailedResponse), - container.ContainerId, - e.ResponseBody], TaskStatus.Failed, LogLevel.Error); + _logger.LogDeletionFailedWithHttpContext(container.ContainerId, e.StatusCode, e.ResponseBody); return; } } @@ -112,14 +105,7 @@ public async Task DestroyContainerAsync(Models.Data.Container container, Cancell goto CreateContainer; } - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerCreationFailedStatus), - parameters.Service.Name, - e.StatusCode], TaskStatus.Failed, LogLevel.Warning); - _logger.SystemLog( - Program.StaticLocalizer[nameof(Resources.Program.ContainerManager_ContainerCreationFailedResponse), - parameters.Service.Name, - e.ResponseBody], TaskStatus.Failed, LogLevel.Error); + _logger.LogCreationFailedWithHttpContext(parameters.Service.Name, e.StatusCode, e.ResponseBody); return null; } catch (Exception e) From d22fe41ec9b2740ba668e40d00b10a41cfe13bf1 Mon Sep 17 00:00:00 2001 From: GZTime Date: Mon, 19 Aug 2024 23:04:44 +0800 Subject: [PATCH 6/6] fix(challenge): return api promise --- src/GZCTF/ClientApp/src/components/GameChallengeModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GZCTF/ClientApp/src/components/GameChallengeModal.tsx b/src/GZCTF/ClientApp/src/components/GameChallengeModal.tsx index 2712f550c..1fc1e8b0a 100644 --- a/src/GZCTF/ClientApp/src/components/GameChallengeModal.tsx +++ b/src/GZCTF/ClientApp/src/components/GameChallengeModal.tsx @@ -75,7 +75,7 @@ const GameChallengeModal: FC = (props) => { // the instanceEntry is already destroyed if (!res?.context?.instanceEntry) return - api.game + return api.game .gameDeleteContainer(gameId, challengeId) .then(() => { mutate({