diff --git a/BackendTests/Services/ActionServiceTests.cs b/BackendTests/Services/ActionServiceTests.cs index 734f282..503fbd5 100644 --- a/BackendTests/Services/ActionServiceTests.cs +++ b/BackendTests/Services/ActionServiceTests.cs @@ -29,30 +29,17 @@ public class ActionServiceTests { _spawns = CreateQueue(); _game = new pacMan.Services.Game(_spawns); - _whiteMessage = new ActionMessage - { - Action = GameAction.JoinGame, - Data = SerializeData(_whitePlayer.Username) - }; - _blackMessage = new ActionMessage - { - Action = GameAction.JoinGame, - Data = SerializeData(_blackPlayer.Username) - }; - _redMessage = new ActionMessage - { - Action = GameAction.JoinGame, - Data = SerializeData(_redPlayer.Username) - }; + _whiteMessage = new ActionMessage { Action = GameAction.JoinGame, Data = SerializeData(_whitePlayer.Username) }; + _blackMessage = new ActionMessage { Action = GameAction.JoinGame, Data = SerializeData(_blackPlayer.Username) }; + _redMessage = new ActionMessage { Action = GameAction.JoinGame, Data = SerializeData(_redPlayer.Username) }; _gameService = Substitute.For(Substitute.For>()); _service = new ActionService(Substitute.For>(), _gameService); } private JsonElement SerializeData(string username) => JsonDocument.Parse(JsonSerializer.Serialize( - new JoinGameData { Username = username, GameId = _game.Id } - ) - ).RootElement; + new JoinGameData { Username = username, GameId = _game.Id } + )).RootElement; private static Queue CreateQueue() => new(new[] @@ -94,13 +81,8 @@ public class ActionServiceTests [Test] public void PlayerInfo_DataIsNotJoinGameData() { - var serialized = - JsonDocument.Parse(JsonSerializer.Serialize(new Box { Colour = "white" })); - var message = new ActionMessage - { - Action = GameAction.JoinGame, - Data = serialized.RootElement - }; + var serialized = JsonDocument.Parse(JsonSerializer.Serialize(new Box { Colour = "white" })); + var message = new ActionMessage { Action = GameAction.JoinGame, Data = serialized.RootElement }; Assert.Throws(() => _service.FindGame(message.Data)); } @@ -176,28 +158,29 @@ public class ActionServiceTests var result = _service.Ready(); // If selected the state is changed to InGame _whitePlayer.State = State.InGame; - var players = result.GetType().GetProperty("Players")?.GetValue(result) as IEnumerable; - Assert.That(players?.First().Username, Is.EqualTo(_whitePlayer.Username)); + Assert.That(result.Players.First().Username, Is.EqualTo(_whitePlayer.Username)); } [Test] public void Ready_TwoReady() { var group = new pacMan.Services.Game(new Queue()) - { Players = { _blackPlayer, _whitePlayer } }; + { + Players = { _blackPlayer, _whitePlayer } + }; _service.Game = group; _service.Player = _blackPlayer; var result = _service.Ready(); - Assert.That(result.GetType().GetProperty("AllReady")?.GetValue(result), Is.EqualTo(false)); + Assert.That(result.AllReady, Is.EqualTo(false)); _service.Player = _whitePlayer; result = _service.Ready(); - var players = result.GetType().GetProperty("Players")?.GetValue(result) as IEnumerable; - Assert.That(players?.First().Username, Is.EqualTo(_blackPlayer.Username).Or.EqualTo(_whitePlayer.Username)); + Assert.That(result.Players.First().Username, + Is.EqualTo(_blackPlayer.Username).Or.EqualTo(_whitePlayer.Username)); } #endregion @@ -216,8 +199,8 @@ public class ActionServiceTests { _service.Game = new pacMan.Services.Game(new Queue( - new[] { new DirectionalPosition { At = new Position { X = 3, Y = 3 }, Direction = Direction.Up } })) - { Players = { _whitePlayer } }; + new[] { new DirectionalPosition { At = new Position { X = 3, Y = 3 }, Direction = Direction.Up } } + )) { Players = { _whitePlayer } }; var name = _service.FindNextPlayer(); Assert.That(name, Is.EqualTo(_whitePlayer.Username)); diff --git a/BackendTests/Services/GameTests.cs b/BackendTests/Services/GameTests.cs index 5ceab4b..fb0822f 100644 --- a/BackendTests/Services/GameTests.cs +++ b/BackendTests/Services/GameTests.cs @@ -123,9 +123,9 @@ public class GameTests [Test] public void AddPlayer_WhenNameExists() { - var redClone = _redPlayer.Clone(); + var redClone = _redPlayer.Clone() as Player; _game.AddPlayer(_redPlayer); - Assert.DoesNotThrow(() => _game.AddPlayer(redClone)); + Assert.DoesNotThrow(() => _game.AddPlayer(redClone!)); } [Test] diff --git a/BackendTests/TestUtils/Players.cs b/BackendTests/TestUtils/Players.cs index 2083995..c7cbff4 100644 --- a/BackendTests/TestUtils/Players.cs +++ b/BackendTests/TestUtils/Players.cs @@ -26,13 +26,4 @@ internal static class Players { Colour = colour }; - - internal static Player Clone(this Player player) => - new() - { - Box = player.Box, - Colour = player.Colour, - Username = player.Username, - PacMan = player.PacMan - }; } diff --git a/README.md b/README.md new file mode 100644 index 0000000..6813fae --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# Pac-Man The Board Game + +Work in progress. + +## Development + +```bash +cd pac-man-board-game/ClientApp +pnpm install +cd .. +dotnet run +``` + +## Stack + +- Frontend + - [TypeScript](https://www.typescriptlang.org/) + - [React](https://reactjs.org/) + - [Jotai](https://jotai.org/) + - [Vite](https://vitejs.dev/) + - [Tailwind CSS](https://tailwindcss.com/) + - [Jest](https://jestjs.io/) +- Backend + - [.NET 7](https://dotnet.microsoft.com/) + - [C#](https://docs.microsoft.com/en-us/dotnet/csharp/) + - [ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-7.0) + - [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) diff --git a/pac-man-board-game/ClientApp/package.json b/pac-man-board-game/ClientApp/package.json index 2c56c25..8ff82de 100644 --- a/pac-man-board-game/ClientApp/package.json +++ b/pac-man-board-game/ClientApp/package.json @@ -15,21 +15,21 @@ "web-vitals": "^3.4.0" }, "devDependencies": { - "@types/react": "^18.2.20", - "@types/react-dom": "^18.2.7", + "@types/react": "^18.2.33", + "@types/react-dom": "^18.2.14", "@vitejs/plugin-react": "^4.0.4", "@vitest/coverage-c8": "^0.33.0", - "autoprefixer": "^10.4.15", + "autoprefixer": "^10.4.16", "cross-env": "^7.0.3", - "happy-dom": "^10.10.4", - "postcss": "^8.4.28", + "happy-dom": "^12.9.1", + "postcss": "^8.4.31", "tailwindcss": "^3.3.3", "typescript": "^5.1.6", "vite": "^4.4.9", - "vite-plugin-node-polyfills": "^0.11.2", + "vite-plugin-node-polyfills": "^0.15.0", "vite-plugin-svgr": "^3.2.0", "vite-tsconfig-paths": "^4.2.0", - "vitest": "^0.34.2" + "vitest": "^0.34.6" }, "resolutions": { "css-what": "^5.0.1", diff --git a/pac-man-board-game/ClientApp/pnpm-lock.yaml b/pac-man-board-game/ClientApp/pnpm-lock.yaml index bb161bd..3e9e903 100644 --- a/pac-man-board-game/ClientApp/pnpm-lock.yaml +++ b/pac-man-board-game/ClientApp/pnpm-lock.yaml @@ -8,86 +8,84 @@ overrides: css-what: ^5.0.1 nth-check: ^3.0.1 -importers: +dependencies: + '@emotion/react': + specifier: ^11.11.1 + version: 11.11.1(@types/react@18.2.33)(react@18.2.0) + '@headlessui/react': + specifier: ^1.7.17 + version: 1.7.17(react-dom@18.2.0)(react@18.2.0) + '@heroicons/react': + specifier: ^2.0.18 + version: 2.0.18(react@18.2.0) + jotai: + specifier: ^2.3.1 + version: 2.3.1(@types/react@18.2.33)(react@18.2.0) + jotai-devtools: + specifier: ^0.6.2 + version: 0.6.2(@emotion/react@11.11.1)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) + oidc-client: + specifier: ^1.11.5 + version: 1.11.5 + react: + specifier: ^18.2.0 + version: 18.2.0 + react-dom: + specifier: ^18.2.0 + version: 18.2.0(react@18.2.0) + react-router-dom: + specifier: ^6.15.0 + version: 6.15.0(react-dom@18.2.0)(react@18.2.0) + web-vitals: + specifier: ^3.4.0 + version: 3.4.0 - .: - dependencies: - '@emotion/react': - specifier: ^11.11.1 - version: 11.11.1(@types/react@18.2.20)(react@18.2.0) - '@headlessui/react': - specifier: ^1.7.17 - version: 1.7.17(react-dom@18.2.0)(react@18.2.0) - '@heroicons/react': - specifier: ^2.0.18 - version: 2.0.18(react@18.2.0) - jotai: - specifier: ^2.3.1 - version: 2.3.1(@types/react@18.2.20)(react@18.2.0) - jotai-devtools: - specifier: ^0.6.2 - version: 0.6.2(@emotion/react@11.11.1)(@types/react@18.2.20)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) - oidc-client: - specifier: ^1.11.5 - version: 1.11.5 - react: - specifier: ^18.2.0 - version: 18.2.0 - react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) - react-router-dom: - specifier: ^6.15.0 - version: 6.15.0(react-dom@18.2.0)(react@18.2.0) - web-vitals: - specifier: ^3.4.0 - version: 3.4.0 - devDependencies: - '@types/react': - specifier: ^18.2.20 - version: 18.2.20 - '@types/react-dom': - specifier: ^18.2.7 - version: 18.2.7 - '@vitejs/plugin-react': - specifier: ^4.0.4 - version: 4.0.4(vite@4.4.9) - '@vitest/coverage-c8': - specifier: ^0.33.0 - version: 0.33.0(vitest@0.34.2) - autoprefixer: - specifier: ^10.4.15 - version: 10.4.15(postcss@8.4.28) - cross-env: - specifier: ^7.0.3 - version: 7.0.3 - happy-dom: - specifier: ^10.10.4 - version: 10.10.4 - postcss: - specifier: ^8.4.28 - version: 8.4.28 - tailwindcss: - specifier: ^3.3.3 - version: 3.3.3 - typescript: - specifier: ^5.1.6 - version: 5.1.6 - vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@20.4.5) - vite-plugin-node-polyfills: - specifier: ^0.11.2 - version: 0.11.2(vite@4.4.9) - vite-plugin-svgr: - specifier: ^3.2.0 - version: 3.2.0(vite@4.4.9) - vite-tsconfig-paths: - specifier: ^4.2.0 - version: 4.2.0(typescript@5.1.6)(vite@4.4.9) - vitest: - specifier: ^0.34.2 - version: 0.34.2(happy-dom@10.10.4) +devDependencies: + '@types/react': + specifier: ^18.2.33 + version: 18.2.33 + '@types/react-dom': + specifier: ^18.2.14 + version: 18.2.14 + '@vitejs/plugin-react': + specifier: ^4.0.4 + version: 4.0.4(vite@4.4.9) + '@vitest/coverage-c8': + specifier: ^0.33.0 + version: 0.33.0(vitest@0.34.6) + autoprefixer: + specifier: ^10.4.16 + version: 10.4.16(postcss@8.4.31) + cross-env: + specifier: ^7.0.3 + version: 7.0.3 + happy-dom: + specifier: ^12.9.1 + version: 12.9.1 + postcss: + specifier: ^8.4.31 + version: 8.4.31 + tailwindcss: + specifier: ^3.3.3 + version: 3.3.3 + typescript: + specifier: ^5.1.6 + version: 5.1.6 + vite: + specifier: ^4.4.9 + version: 4.4.9(@types/node@20.4.5) + vite-plugin-node-polyfills: + specifier: ^0.15.0 + version: 0.15.0(vite@4.4.9) + vite-plugin-svgr: + specifier: ^3.2.0 + version: 3.2.0(vite@4.4.9) + vite-tsconfig-paths: + specifier: ^4.2.0 + version: 4.2.0(typescript@5.1.6)(vite@4.4.9) + vitest: + specifier: ^0.34.6 + version: 0.34.6(happy-dom@12.9.1) packages: @@ -104,6 +102,14 @@ packages: '@jridgewell/trace-mapping': 0.3.18 dev: true + /@babel/code-frame@7.22.13: + resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.20 + chalk: 2.4.2 + dev: true + /@babel/code-frame@7.22.5: resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} engines: {node: '>=6.9.0'} @@ -127,7 +133,7 @@ packages: '@babel/helpers': 7.22.6 '@babel/parser': 7.22.7 '@babel/template': 7.22.5 - '@babel/traverse': 7.22.8 + '@babel/traverse': 7.23.2 '@babel/types': 7.22.5 convert-source-map: 1.9.0 debug: 4.3.4 @@ -148,6 +154,16 @@ packages: jsesc: 2.5.2 dev: true + /@babel/generator@7.23.0: + resolution: {integrity: sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.0 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.18 + jsesc: 2.5.2 + dev: true + /@babel/helper-compilation-targets@7.22.9(@babel/core@7.22.9): resolution: {integrity: sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==} engines: {node: '>=6.9.0'} @@ -162,24 +178,29 @@ packages: semver: 6.3.1 dev: true + /@babel/helper-environment-visitor@7.22.20: + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-environment-visitor@7.22.5: resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} engines: {node: '>=6.9.0'} dev: true - /@babel/helper-function-name@7.22.5: - resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} + /@babel/helper-function-name@7.23.0: + resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/template': 7.22.15 + '@babel/types': 7.23.0 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.23.0 dev: true /@babel/helper-module-imports@7.22.5: @@ -218,13 +239,18 @@ packages: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.23.0 dev: true /@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} + /@babel/helper-validator-identifier@7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-validator-identifier@7.22.5: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} @@ -239,12 +265,21 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/traverse': 7.22.8 + '@babel/traverse': 7.23.2 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color dev: true + /@babel/highlight@7.22.20: + resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.20 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + /@babel/highlight@7.22.5: resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} engines: {node: '>=6.9.0'} @@ -261,6 +296,14 @@ packages: '@babel/types': 7.22.5 dev: true + /@babel/parser@7.23.0: + resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.23.0 + dev: true + /@babel/plugin-transform-react-jsx-self@7.22.5(@babel/core@7.22.9): resolution: {integrity: sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==} engines: {node: '>=6.9.0'} @@ -288,6 +331,15 @@ packages: regenerator-runtime: 0.13.11 dev: false + /@babel/template@7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 + dev: true + /@babel/template@7.22.5: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} @@ -297,18 +349,18 @@ packages: '@babel/types': 7.22.5 dev: true - /@babel/traverse@7.22.8: - resolution: {integrity: sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==} + /@babel/traverse@7.23.2: + resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.9 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.23.0 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: @@ -323,6 +375,15 @@ packages: '@babel/helper-validator-identifier': 7.22.5 to-fast-properties: 2.0.0 + /@babel/types@7.23.0: + resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true @@ -361,7 +422,7 @@ packages: resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} dev: false - /@emotion/react@11.11.1(@types/react@18.2.20)(react@18.2.0): + /@emotion/react@11.11.1(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} peerDependencies: '@types/react': '*' @@ -377,7 +438,7 @@ packages: '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 - '@types/react': 18.2.20 + '@types/react': 18.2.33 hoist-non-react-statics: 3.3.2 react: 18.2.0 dev: false @@ -721,7 +782,7 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true - /@mantine/core@6.0.19(@emotion/react@11.11.1)(@mantine/hooks@6.0.19)(@types/react@18.2.20)(react-dom@18.2.0)(react@18.2.0): + /@mantine/core@6.0.19(@emotion/react@11.11.1)(@mantine/hooks@6.0.19)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-SvMZCOgCc315SIg6hkuLM0ZnBaAac4VFDHZ0BM5LIE4MPJUpe4QOLsg/5RGxOa5s7JRCtu/dawH3/9frvfDrhw==} peerDependencies: '@mantine/hooks': 6.0.19 @@ -735,8 +796,8 @@ packages: '@radix-ui/react-scroll-area': 1.0.2(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-remove-scroll: 2.5.6(@types/react@18.2.20)(react@18.2.0) - react-textarea-autosize: 8.3.4(@types/react@18.2.20)(react@18.2.0) + react-remove-scroll: 2.5.6(@types/react@18.2.33)(react@18.2.0) + react-textarea-autosize: 8.3.4(@types/react@18.2.33)(react@18.2.0) transitivePeerDependencies: - '@emotion/react' - '@types/react' @@ -758,7 +819,7 @@ packages: react: '>=16.8.0' react-dom: '>=16.8.0' dependencies: - '@mantine/core': 6.0.19(@emotion/react@11.11.1)(@mantine/hooks@6.0.19)(@types/react@18.2.20)(react-dom@18.2.0)(react@18.2.0) + '@mantine/core': 6.0.19(@emotion/react@11.11.1)(@mantine/hooks@6.0.19)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0) '@mantine/hooks': 6.0.19(react@18.2.0) '@mantine/utils': 6.0.19(react@18.2.0) prism-react-renderer: 1.3.5(react@18.2.0) @@ -773,7 +834,7 @@ packages: react: '>=16.8.0' react-dom: '>=16.8.0' dependencies: - '@emotion/react': 11.11.1(@types/react@18.2.20)(react@18.2.0) + '@emotion/react': 11.11.1(@types/react@18.2.33)(react@18.2.0) clsx: 1.1.1 csstype: 3.0.9 react: 18.2.0 @@ -1126,14 +1187,14 @@ packages: /@types/prop-types@15.7.5: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} - /@types/react-dom@18.2.7: - resolution: {integrity: sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==} + /@types/react-dom@18.2.14: + resolution: {integrity: sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==} dependencies: - '@types/react': 18.2.20 + '@types/react': 18.2.33 dev: true - /@types/react@18.2.20: - resolution: {integrity: sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw==} + /@types/react@18.2.33: + resolution: {integrity: sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.3 @@ -1157,7 +1218,7 @@ packages: - supports-color dev: true - /@vitest/coverage-c8@0.33.0(vitest@0.34.2): + /@vitest/coverage-c8@0.33.0(vitest@0.34.6): resolution: {integrity: sha512-DaF1zJz4dcOZS4k/neiQJokmOWqsGXwhthfmUdPGorXIQHjdPvV6JQSYhQDI41MyI8c+IieQUdIDs5XAMHtDDw==} peerDependencies: vitest: '>=0.30.0 <1' @@ -1167,41 +1228,41 @@ packages: magic-string: 0.30.2 picocolors: 1.0.0 std-env: 3.3.3 - vitest: 0.34.2(happy-dom@10.10.4) + vitest: 0.34.6(happy-dom@12.9.1) dev: true - /@vitest/expect@0.34.2: - resolution: {integrity: sha512-EZm2dMNlLyIfDMha17QHSQcg2KjeAZaXd65fpPzXY5bvnfx10Lcaz3N55uEe8PhF+w4pw+hmrlHLLlRn9vkBJg==} + /@vitest/expect@0.34.6: + resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==} dependencies: - '@vitest/spy': 0.34.2 - '@vitest/utils': 0.34.2 - chai: 4.3.7 + '@vitest/spy': 0.34.6 + '@vitest/utils': 0.34.6 + chai: 4.3.10 dev: true - /@vitest/runner@0.34.2: - resolution: {integrity: sha512-8ydGPACVX5tK3Dl0SUwxfdg02h+togDNeQX3iXVFYgzF5odxvaou7HnquALFZkyVuYskoaHUOqOyOLpOEj5XTA==} + /@vitest/runner@0.34.6: + resolution: {integrity: sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==} dependencies: - '@vitest/utils': 0.34.2 + '@vitest/utils': 0.34.6 p-limit: 4.0.0 pathe: 1.1.1 dev: true - /@vitest/snapshot@0.34.2: - resolution: {integrity: sha512-qhQ+xy3u4mwwLxltS4Pd4SR+XHv4EajiTPNY3jkIBLUApE6/ce72neJPSUQZ7bL3EBuKI+NhvzhGj3n5baRQUQ==} + /@vitest/snapshot@0.34.6: + resolution: {integrity: sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==} dependencies: magic-string: 0.30.2 pathe: 1.1.1 pretty-format: 29.6.2 dev: true - /@vitest/spy@0.34.2: - resolution: {integrity: sha512-yd4L9OhfH6l0Av7iK3sPb3MykhtcRN5c5K5vm1nTbuN7gYn+yvUVVsyvzpHrjqS7EWqn9WsPJb7+0c3iuY60tA==} + /@vitest/spy@0.34.6: + resolution: {integrity: sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==} dependencies: tinyspy: 2.1.1 dev: true - /@vitest/utils@0.34.2: - resolution: {integrity: sha512-Lzw+kAsTPubhoQDp1uVAOP6DhNia1GMDsI9jgB0yMn+/nDaPieYQ88lKqz/gGjSHL4zwOItvpehec9OY+rS73w==} + /@vitest/utils@0.34.6: + resolution: {integrity: sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==} dependencies: diff-sequences: 29.4.3 loupe: 2.3.6 @@ -1296,19 +1357,19 @@ packages: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true - /autoprefixer@10.4.15(postcss@8.4.28): - resolution: {integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==} + /autoprefixer@10.4.16(postcss@8.4.31): + resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: postcss: ^8.1.0 dependencies: browserslist: 4.21.10 - caniuse-lite: 1.0.30001520 - fraction.js: 4.2.0 + caniuse-lite: 1.0.30001554 + fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.28 + postcss: 8.4.31 postcss-value-parser: 4.2.0 dev: true @@ -1409,8 +1470,9 @@ packages: randombytes: 2.1.0 dev: true - /browserify-sign@4.2.1: - resolution: {integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==} + /browserify-sign@4.2.2: + resolution: {integrity: sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==} + engines: {node: '>= 4'} dependencies: bn.js: 5.2.1 browserify-rsa: 4.1.0 @@ -1434,7 +1496,7 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001520 + caniuse-lite: 1.0.30001554 electron-to-chromium: 1.4.477 node-releases: 2.0.13 update-browserslist-db: 1.0.11(browserslist@4.21.10) @@ -1507,18 +1569,18 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite@1.0.30001520: - resolution: {integrity: sha512-tahF5O9EiiTzwTUqAeFjIZbn4Dnqxzz7ktrgGlMYNLH43Ul26IgTMH/zvL3DG0lZxBYnlT04axvInszUsZULdA==} + /caniuse-lite@1.0.30001554: + resolution: {integrity: sha512-A2E3U//MBwbJVzebddm1YfNp7Nud5Ip+IPn4BozBmn4KqVX7AvluoIDFWjsv5OkGnKUXQVmMSoMKLa3ScCblcQ==} dev: true - /chai@4.3.7: - resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} + /chai@4.3.10: + resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 - check-error: 1.0.2 + check-error: 1.0.3 deep-eql: 4.1.3 - get-func-name: 2.0.0 + get-func-name: 2.0.2 loupe: 2.3.6 pathval: 1.1.1 type-detect: 4.0.8 @@ -1540,8 +1602,10 @@ packages: supports-color: 7.2.0 dev: false - /check-error@1.0.2: - resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + /check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + dependencies: + get-func-name: 2.0.2 dev: true /chokidar@3.5.3: @@ -1713,7 +1777,7 @@ packages: resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} dependencies: browserify-cipher: 1.0.1 - browserify-sign: 4.2.1 + browserify-sign: 4.2.2 create-ecdh: 4.0.4 create-hash: 1.2.0 create-hmac: 1.1.7 @@ -1725,8 +1789,8 @@ packages: randomfill: 1.0.4 dev: true - /crypto-js@4.1.1: - resolution: {integrity: sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==} + /crypto-js@4.2.0: + resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} dev: false /css.escape@1.5.1: @@ -1958,8 +2022,8 @@ packages: signal-exit: 3.0.7 dev: true - /fraction.js@4.2.0: - resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==} + /fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} dev: true /fs.realpath@1.0.0: @@ -1987,8 +2051,8 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-func-name@2.0.0: - resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} + /get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: true /get-intrinsic@1.2.1: @@ -2056,8 +2120,8 @@ packages: get-intrinsic: 1.2.1 dev: true - /happy-dom@10.10.4: - resolution: {integrity: sha512-aEEFGSSs4DEJbxXvSMsIvJvvdsZbJZQEgtHsU4GgwNKbSbFxtgu6vXHmn4XoXnuElIbXV0xhbJiiQTxPnTmJcw==} + /happy-dom@12.9.1: + resolution: {integrity: sha512-UvQ3IwKn1G3iiNCdTrhijdLGqf8Vj7d3OpmYcPwlKakjFy83oYbW6TmOKDLMTVLO9whmOC1HIpS09wf/14k7cA==} dependencies: css.escape: 1.5.1 entities: 4.5.0 @@ -2297,15 +2361,15 @@ packages: hasBin: true dev: true - /jotai-devtools@0.6.2(@emotion/react@11.11.1)(@types/react@18.2.20)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1): + /jotai-devtools@0.6.2(@emotion/react@11.11.1)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1): resolution: {integrity: sha512-iHKYt8V2T2Gh2DtGRpvpv2daVoFoHRJXqk5/LHnhFkJy9rMQuIGo4XgVu/v1ZMSvMzwDXdU3hDOQkfQWlDErUQ==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': '>=11.0.0' react: '>=17.0.0' dependencies: - '@emotion/react': 11.11.1(@types/react@18.2.20)(react@18.2.0) - '@mantine/core': 6.0.19(@emotion/react@11.11.1)(@mantine/hooks@6.0.19)(@types/react@18.2.20)(react-dom@18.2.0)(react@18.2.0) + '@emotion/react': 11.11.1(@types/react@18.2.33)(react@18.2.0) + '@mantine/core': 6.0.19(@emotion/react@11.11.1)(@mantine/hooks@6.0.19)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0) '@mantine/hooks': 6.0.19(react@18.2.0) '@mantine/prism': 6.0.19(@mantine/core@6.0.19)(@mantine/hooks@6.0.19)(react-dom@18.2.0)(react@18.2.0) '@redux-devtools/extension': 3.2.5(redux@4.2.1) @@ -2313,7 +2377,7 @@ packages: jsondiffpatch: 0.5.0 react: 18.2.0 react-error-boundary: 4.0.11(react@18.2.0) - react-json-tree: 0.18.0(@types/react@18.2.20)(react@18.2.0) + react-json-tree: 0.18.0(@types/react@18.2.33)(react@18.2.0) react-resizable-panels: 0.0.54(react-dom@18.2.0)(react@18.2.0) transitivePeerDependencies: - '@types/react' @@ -2321,7 +2385,7 @@ packages: - redux dev: false - /jotai@2.3.1(@types/react@18.2.20)(react@18.2.0): + /jotai@2.3.1(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-pXhx8/MeRUAHbzayerEUf9NHvP+Ba3q9WAvIMjaSwwuSCKEFhb8UW4XuZPC+Bv4u2ufvlyrxIZ+vy5UJ3f8JsQ==} engines: {node: '>=12.20.0'} peerDependencies: @@ -2333,7 +2397,7 @@ packages: react: optional: true dependencies: - '@types/react': 18.2.20 + '@types/react': 18.2.33 react: 18.2.0 dev: false @@ -2374,6 +2438,7 @@ packages: chalk: 3.0.0 diff-match-patch: 1.0.5 dev: false + bundledDependencies: [] /lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} @@ -2409,7 +2474,7 @@ packages: /loupe@2.3.6: resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} dependencies: - get-func-name: 2.0.0 + get-func-name: 2.0.2 dev: true /lru-cache@5.1.1: @@ -2596,7 +2661,7 @@ packages: acorn: 7.4.1 base64-js: 1.5.1 core-js: 3.32.0 - crypto-js: 4.1.1 + crypto-js: 4.2.0 serialize-javascript: 4.0.0 dev: false @@ -2739,29 +2804,29 @@ packages: pathe: 1.1.1 dev: true - /postcss-import@15.1.0(postcss@8.4.28): + /postcss-import@15.1.0(postcss@8.4.31): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.28 + postcss: 8.4.31 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.2 dev: true - /postcss-js@4.0.1(postcss@8.4.28): + /postcss-js@4.0.1(postcss@8.4.31): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.4.21 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.28 + postcss: 8.4.31 dev: true - /postcss-load-config@4.0.1(postcss@8.4.28): + /postcss-load-config@4.0.1(postcss@8.4.31): resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -2774,17 +2839,17 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - postcss: 8.4.28 + postcss: 8.4.31 yaml: 2.3.1 dev: true - /postcss-nested@6.0.1(postcss@8.4.28): + /postcss-nested@6.0.1(postcss@8.4.31): resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.28 + postcss: 8.4.31 postcss-selector-parser: 6.0.13 dev: true @@ -2800,8 +2865,8 @@ packages: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} dev: true - /postcss@8.4.28: - resolution: {integrity: sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==} + /postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -2913,7 +2978,7 @@ packages: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true - /react-json-tree@0.18.0(@types/react@18.2.20)(react@18.2.0): + /react-json-tree@0.18.0(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-Qe6HKSXrr++n9Y31nkRJ3XvQMATISpqigH1vEKhLwB56+nk5thTP0ITThpjxY6ZG/ubpVq/aEHIcyLP/OPHxeA==} peerDependencies: '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -2921,7 +2986,7 @@ packages: dependencies: '@babel/runtime': 7.22.6 '@types/lodash': 4.14.196 - '@types/react': 18.2.20 + '@types/react': 18.2.33 react: 18.2.0 react-base16-styling: 0.9.1 dev: false @@ -2931,7 +2996,7 @@ packages: engines: {node: '>=0.10.0'} dev: true - /react-remove-scroll-bar@2.3.4(@types/react@18.2.20)(react@18.2.0): + /react-remove-scroll-bar@2.3.4(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==} engines: {node: '>=10'} peerDependencies: @@ -2941,13 +3006,13 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.20 + '@types/react': 18.2.33 react: 18.2.0 - react-style-singleton: 2.2.1(@types/react@18.2.20)(react@18.2.0) + react-style-singleton: 2.2.1(@types/react@18.2.33)(react@18.2.0) tslib: 2.6.1 dev: false - /react-remove-scroll@2.5.6(@types/react@18.2.20)(react@18.2.0): + /react-remove-scroll@2.5.6(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-bO856ad1uDYLefgArk559IzUNeQ6SWH4QnrevIUjH+GczV56giDfl3h0Idptf2oIKxQmd1p9BN25jleKodTALg==} engines: {node: '>=10'} peerDependencies: @@ -2957,13 +3022,13 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.20 + '@types/react': 18.2.33 react: 18.2.0 - react-remove-scroll-bar: 2.3.4(@types/react@18.2.20)(react@18.2.0) - react-style-singleton: 2.2.1(@types/react@18.2.20)(react@18.2.0) + react-remove-scroll-bar: 2.3.4(@types/react@18.2.33)(react@18.2.0) + react-style-singleton: 2.2.1(@types/react@18.2.33)(react@18.2.0) tslib: 2.6.1 - use-callback-ref: 1.3.0(@types/react@18.2.20)(react@18.2.0) - use-sidecar: 1.1.2(@types/react@18.2.20)(react@18.2.0) + use-callback-ref: 1.3.0(@types/react@18.2.33)(react@18.2.0) + use-sidecar: 1.1.2(@types/react@18.2.33)(react@18.2.0) dev: false /react-resizable-panels@0.0.54(react-dom@18.2.0)(react@18.2.0): @@ -2999,7 +3064,7 @@ packages: react: 18.2.0 dev: false - /react-style-singleton@2.2.1(@types/react@18.2.20)(react@18.2.0): + /react-style-singleton@2.2.1(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: @@ -3009,14 +3074,14 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.20 + '@types/react': 18.2.33 get-nonce: 1.0.1 invariant: 2.2.4 react: 18.2.0 tslib: 2.6.1 dev: false - /react-textarea-autosize@8.3.4(@types/react@18.2.20)(react@18.2.0): + /react-textarea-autosize@8.3.4(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-CdtmP8Dc19xL8/R6sWvtknD/eCXkQr30dtvC4VmGInhRsfF8X/ihXCq6+9l9qbxmKRiq407/7z5fxE7cVWQNgQ==} engines: {node: '>=10'} peerDependencies: @@ -3025,7 +3090,7 @@ packages: '@babel/runtime': 7.22.6 react: 18.2.0 use-composed-ref: 1.3.0(react@18.2.0) - use-latest: 1.2.1(@types/react@18.2.20)(react@18.2.0) + use-latest: 1.2.1(@types/react@18.2.33)(react@18.2.0) transitivePeerDependencies: - '@types/react' dev: false @@ -3320,11 +3385,11 @@ packages: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.28 - postcss-import: 15.1.0(postcss@8.4.28) - postcss-js: 4.0.1(postcss@8.4.28) - postcss-load-config: 4.0.1(postcss@8.4.28) - postcss-nested: 6.0.1(postcss@8.4.28) + postcss: 8.4.31 + postcss-import: 15.1.0(postcss@8.4.31) + postcss-js: 4.0.1(postcss@8.4.31) + postcss-load-config: 4.0.1(postcss@8.4.31) + postcss-nested: 6.0.1(postcss@8.4.31) postcss-selector-parser: 6.0.13 resolve: 1.22.2 sucrase: 3.34.0 @@ -3444,7 +3509,7 @@ packages: qs: 6.11.2 dev: true - /use-callback-ref@1.3.0(@types/react@18.2.20)(react@18.2.0): + /use-callback-ref@1.3.0(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==} engines: {node: '>=10'} peerDependencies: @@ -3454,7 +3519,7 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.20 + '@types/react': 18.2.33 react: 18.2.0 tslib: 2.6.1 dev: false @@ -3467,7 +3532,7 @@ packages: react: 18.2.0 dev: false - /use-isomorphic-layout-effect@1.1.2(@types/react@18.2.20)(react@18.2.0): + /use-isomorphic-layout-effect@1.1.2(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' @@ -3476,11 +3541,11 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.20 + '@types/react': 18.2.33 react: 18.2.0 dev: false - /use-latest@1.2.1(@types/react@18.2.20)(react@18.2.0): + /use-latest@1.2.1(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==} peerDependencies: '@types/react': '*' @@ -3489,12 +3554,12 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.20 + '@types/react': 18.2.33 react: 18.2.0 - use-isomorphic-layout-effect: 1.1.2(@types/react@18.2.20)(react@18.2.0) + use-isomorphic-layout-effect: 1.1.2(@types/react@18.2.33)(react@18.2.0) dev: false - /use-sidecar@1.1.2(@types/react@18.2.20)(react@18.2.0): + /use-sidecar@1.1.2(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} engines: {node: '>=10'} peerDependencies: @@ -3504,7 +3569,7 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.20 + '@types/react': 18.2.33 detect-node-es: 1.1.0 react: 18.2.0 tslib: 2.6.1 @@ -3533,8 +3598,8 @@ packages: convert-source-map: 1.9.0 dev: true - /vite-node@0.34.2(@types/node@20.4.5): - resolution: {integrity: sha512-JtW249Zm3FB+F7pQfH56uWSdlltCo1IOkZW5oHBzeQo0iX4jtC7o1t9aILMGd9kVekXBP2lfJBEQt9rBh07ebA==} + /vite-node@0.34.6(@types/node@20.4.5): + resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} hasBin: true dependencies: @@ -3555,15 +3620,15 @@ packages: - terser dev: true - /vite-plugin-node-polyfills@0.11.2(vite@4.4.9): - resolution: {integrity: sha512-KaMZ5Pgi5dT7Br21upTWNgkgyBPBBGHl9gQcv6fPfUa73v10mRgi88Rh7aLauvmdyqsLBmhJmRBbI9dmbVG9sA==} + /vite-plugin-node-polyfills@0.15.0(vite@4.4.9): + resolution: {integrity: sha512-IF9aTSPV9zebrcC6ezJA3Ym4r4U1C3jKUAnG16Sq7+UPtisNEOcNOAu3p5wcgFFOuuUwAUjQlIeJHMcnSXXemQ==} peerDependencies: vite: ^2.0.0 || ^3.0.0 || ^4.0.0 dependencies: '@rollup/plugin-inject': 5.0.3 buffer-polyfill: /buffer@6.0.3 node-stdlib-browser: 1.2.0 - process-polyfill: /process@0.11.10 + process: 0.11.10 vite: 4.4.9(@types/node@20.4.5) transitivePeerDependencies: - rollup @@ -3630,14 +3695,14 @@ packages: dependencies: '@types/node': 20.4.5 esbuild: 0.18.17 - postcss: 8.4.28 + postcss: 8.4.31 rollup: 3.27.2 optionalDependencies: fsevents: 2.3.2 dev: true - /vitest@0.34.2(happy-dom@10.10.4): - resolution: {integrity: sha512-WgaIvBbjsSYMq/oiMlXUI7KflELmzM43BEvkdC/8b5CAod4ryAiY2z8uR6Crbi5Pjnu5oOmhKa9sy7uk6paBxQ==} + /vitest@0.34.6(happy-dom@12.9.1): + resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} engines: {node: '>=v14.18.0'} hasBin: true peerDependencies: @@ -3670,17 +3735,17 @@ packages: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 '@types/node': 20.4.5 - '@vitest/expect': 0.34.2 - '@vitest/runner': 0.34.2 - '@vitest/snapshot': 0.34.2 - '@vitest/spy': 0.34.2 - '@vitest/utils': 0.34.2 + '@vitest/expect': 0.34.6 + '@vitest/runner': 0.34.6 + '@vitest/snapshot': 0.34.6 + '@vitest/spy': 0.34.6 + '@vitest/utils': 0.34.6 acorn: 8.10.0 acorn-walk: 8.2.0 cac: 6.7.14 - chai: 4.3.7 + chai: 4.3.10 debug: 4.3.4 - happy-dom: 10.10.4 + happy-dom: 12.9.1 local-pkg: 0.4.3 magic-string: 0.30.2 pathe: 1.1.1 @@ -3690,7 +3755,7 @@ packages: tinybench: 2.5.0 tinypool: 0.7.0 vite: 4.4.9(@types/node@20.4.5) - vite-node: 0.34.2(@types/node@20.4.5) + vite-node: 0.34.6(@types/node@20.4.5) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/pac-man-board-game/ClientApp/src/App.tsx b/pac-man-board-game/ClientApp/src/App.tsx index 9b53acd..6086812 100644 --- a/pac-man-board-game/ClientApp/src/App.tsx +++ b/pac-man-board-game/ClientApp/src/App.tsx @@ -1,5 +1,5 @@ -import React, {FC, useEffect} from "react"; -import {Route, Routes, useNavigate} from "react-router-dom"; +import React, {FC} from "react"; +import {Navigate, Route, Routes} from "react-router-dom"; import Layout from "./components/layout"; import AppRoutes from "./AppRoutes"; import "./index.css"; @@ -23,20 +23,14 @@ export const App: FC = () => ( * @param secured Whether or not the page is secured. * @constructor The Secured component. */ -const Secured: FC<{ secured: boolean } & ChildProps> = ({children, secured}) => { +const Secured: FC<{ + secured: boolean +} & ChildProps> = ({children, secured}) => { const player = useAtomValue(thisPlayerAtom); - const navigate = useNavigate(); - const redirect = secured && player === undefined - useEffect(() => { - if (redirect) { - navigate("/login"); - } - }); - - if (!redirect) { - return ( - <>{children} - ) + if (secured && player === undefined) { + return } + + return <>{children} } diff --git a/pac-man-board-game/ClientApp/src/AppRoutes.tsx b/pac-man-board-game/ClientApp/src/AppRoutes.tsx index 85aded3..8fa3cc4 100644 --- a/pac-man-board-game/ClientApp/src/AppRoutes.tsx +++ b/pac-man-board-game/ClientApp/src/AppRoutes.tsx @@ -27,6 +27,10 @@ const AppRoutes = [ { path: "/login", element: + }, + { + path: "*", + element:

Page not found

} ]; diff --git a/pac-man-board-game/ClientApp/src/types/types.d.ts b/pac-man-board-game/ClientApp/src/types/types.d.ts index d02e173..00ea66d 100644 --- a/pac-man-board-game/ClientApp/src/types/types.d.ts +++ b/pac-man-board-game/ClientApp/src/types/types.d.ts @@ -33,6 +33,7 @@ type DirectionalPosition = { type Path = { path?: Position[] | null, + // TODO replace with DirectionalPosition end: Position, direction: import("../game/direction").Direction } diff --git a/pac-man-board-game/ClientApp/src/utils/actions.ts b/pac-man-board-game/ClientApp/src/utils/actions.ts index b5e4d57..7e2f610 100644 --- a/pac-man-board-game/ClientApp/src/utils/actions.ts +++ b/pac-man-board-game/ClientApp/src/utils/actions.ts @@ -105,17 +105,15 @@ function joinGame(data?: PlayerProps[]): void { // TODO missing data when refres store.set(playersAtom, playerProps.map(p => new Player(p))); } -type ReadyData = { allReady: boolean, players: PlayerProps[] } | string; +type ReadyData = { allReady: boolean, players: PlayerProps[] }; function ready(data?: ReadyData): void { - if (data && typeof data !== "string") { + if (data) { const players = data.players.map(p => new Player(p)); store.set(playersAtom, players); if (data.allReady) { store.set(currentPlayerNameAtom, data.players[0].username); } - } else { - console.error("Error:", data); } } diff --git a/pac-man-board-game/Controllers/GenericController.cs b/pac-man-board-game/Controllers/GenericController.cs index 8e06533..8fcee00 100644 --- a/pac-man-board-game/Controllers/GenericController.cs +++ b/pac-man-board-game/Controllers/GenericController.cs @@ -52,7 +52,8 @@ public abstract class GenericController : ControllerBase } while (true); var disconnectSegment = Disconnect(); - if (disconnectSegment != null) SendDisconnectMessage((ArraySegment)disconnectSegment); + if (disconnectSegment != null) + SendDisconnectMessage((ArraySegment)disconnectSegment); await _webSocketService.Close(WebSocket, result.CloseStatus.Value, result.CloseStatusDescription); } diff --git a/pac-man-board-game/GameStuff/Items/Player.cs b/pac-man-board-game/GameStuff/Items/Player.cs index 640be81..bbfaaa1 100644 --- a/pac-man-board-game/GameStuff/Items/Player.cs +++ b/pac-man-board-game/GameStuff/Items/Player.cs @@ -11,7 +11,7 @@ public enum State Disconnected } -public class Player : IEquatable +public class Player : IEquatable, ICloneable { [JsonPropertyName("username")] public required string Username { get; init; } @@ -23,6 +23,12 @@ public class Player : IEquatable [JsonPropertyName("state")] public State State { get; set; } = State.WaitingForPlayers; + public object Clone() => + new Player + { + Username = Username, Colour = Colour, PacMan = PacMan, Box = Box, State = State + }; + public bool Equals(Player? other) { if (ReferenceEquals(null, other)) return false; diff --git a/pac-man-board-game/Utils/Extensions.cs b/pac-man-board-game/Utils/Extensions.cs index be90bc3..9cc7a59 100644 --- a/pac-man-board-game/Utils/Extensions.cs +++ b/pac-man-board-game/Utils/Extensions.cs @@ -4,13 +4,13 @@ using System.Text.RegularExpressions; namespace pacMan.Utils; -public static class Extensions +public static partial class Extensions { public static string GetString(this byte[] bytes, int length) { var s = Encoding.UTF8.GetString(bytes, 0, length); // Removes invalid characters from the string - return Regex.Replace(s, @"\p{C}+", ""); + return InvalidCharacters().Replace(s, ""); } public static ArraySegment ToArraySegment(this object obj) @@ -19,4 +19,7 @@ public static class Extensions var bytes = Encoding.UTF8.GetBytes(json); return new ArraySegment(bytes, 0, json.Length); } -} \ No newline at end of file + + [GeneratedRegex("\\p{C}+")] + private static partial Regex InvalidCharacters(); +} diff --git a/pac-man-board-game/pac-man-board-game.csproj b/pac-man-board-game/pac-man-board-game.csproj index 7257539..ba325a7 100644 --- a/pac-man-board-game/pac-man-board-game.csproj +++ b/pac-man-board-game/pac-man-board-game.csproj @@ -21,7 +21,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - +