Skip to content

Commit

Permalink
refactor: 🎨 cleaner packet routing in gateway (#2204)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced new services for handling message routing in the MCOTS and
NPS ports.
	- Added new classes for managing game messages and packets.
- Enhanced utility functions for socket management and encryption
compatibility.

- **Bug Fixes**
- Corrected indentation for volume declarations in the docker-compose
file.

- **Removals**
- Removed several unused functions and classes related to player and
session management.
- Eliminated functions for warehouse inventory and part assembly
transfer.
	- Removed user account management functions and associated tests.

- **Updates**
	- Improved socket connection handling and logging.
	- Enhanced error handling in chat data processing.
	- Updated TypeScript configurations for better compatibility.
	- Streamlined export declarations for shared functions.
	- Added new type definitions for `GatewayOptions`.
	- Updated function exports for better accessibility.

- **Tests**
	- Added new test suites for port routers and socket utilities.
	- Introduced unit tests for the new `GamePacket` class.
- Added tests for `GameMessagePayload` to validate serialization and
encryption functionalities.
- Updated tests to reflect changes in class instantiation and method
usage.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
drazisil authored Oct 12, 2024
1 parent c3cc8ad commit 498aa29
Show file tree
Hide file tree
Showing 79 changed files with 3,646 additions and 4,261 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,6 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
codecovcli --verbose do-upload --fail-on-error --flag persona --name persona --dir packages/persona
- name: Codecov upload sessions coverage
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
codecovcli --verbose do-upload --fail-on-error --flag sessions --name sessions --dir packages/sessions
- name: Codecov upload shard coverage
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step
env:
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: rustyserver

services:
nginx:
build:
Expand Down Expand Up @@ -63,4 +65,4 @@ services:
# - db

volumes:
pgadmin:
pgadmin:
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@
"@sentry/profiling-node": "8.34.0",
"adminjs": "^7.8.13",
"fastify": "^5.0.0",
"lobby": "link:packages/lobby",
"moment": "^2.30.1",
"pino": "^9.4.0",
"pino-pretty": "^11.2.2",
"rusty-motors-chat": "link:src/chat",
"rusty-motors-cli": "link:packages/cli",
"rusty-motors-connection": "link:packages/connection",
"rusty-motors-database": "link:packages/database",
"rusty-motors-gateway": "link:packages/gateway",
"rusty-motors-lobby": "link:packages/lobby",
Expand All @@ -52,7 +50,6 @@
"rusty-motors-nps": "link:packages/nps",
"rusty-motors-patch": "link:packages/patch",
"rusty-motors-personas": "link:packages/persona",
"rusty-motors-sessions": "link:packages/sessions",
"rusty-motors-shard": "link:packages/shard",
"rusty-motors-shared": "link:packages/shared",
"rusty-motors-shared-packets": "link:packages/shared-packets",
Expand All @@ -72,7 +69,7 @@
"@tsconfig/node-lts": "^20.1.3",
"@tsconfig/node20": "^20.1.4",
"@types/chai": "5.0.0",
"@types/node": "^22.7.5",
"@types/node": "^20.16.11",
"@types/sinon": "17.0.3",
"@types/sinon-chai": "4.0.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
Expand Down Expand Up @@ -117,4 +114,4 @@
}
},
"packageManager": "pnpm@9.12.1+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4"
}
}
335 changes: 0 additions & 335 deletions packages/core/src/serializationHelpers.test.ts

This file was deleted.

Loading

0 comments on commit 498aa29

Please sign in to comment.