fix(monitor): use global console channel and implement shard filtering (#87)
Lint / pre-commit Linting (push) Successful in 47s
Test / Run Tests (push) Successful in 1m3s

This PR fixes the issue where console monitoring was empty when a specific shard was targeted on the official Screeps server.

### Changes:
- **Unified Subscription**: Changed WebSocket subscription path from `shard/console` (invalid) to the global `console` channel.
- **Shard Filtering**: Implemented client-side filtering in `handleConsoleEvent` to only display logs matching the targeted shard.
- **Precise Timing**: Retained the shard-specific `api.time()` call for accurate tick duration tracking.
- **Tests**: Added and updated 48 unit tests verifying the fix and shard filtering logic.
- **Distribution**: Rebuilt `dist/index.js` and bumped version to `v0.2.1`.

Reviewed-on: #87
This commit was merged in pull request #87.
This commit is contained in:
2026-05-16 22:29:24 +02:00
parent bf52580bf3
commit 076e96f3de
5 changed files with 263 additions and 1972 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "screeps-deploy-action",
"version": "0.2.0",
"version": "0.2.1",
"description": "Deploys screeps code to the official game or a private server.",
"type": "module",
"main": "index.js",
@@ -10,6 +10,7 @@
"build": "ncc build index.js -o dist -m --external utf-8-validate --external bufferutil"
},
"dependencies": {
"@actions/artifact": "^1.1.2",
"@actions/core": "^3.0.0",
"glob": "^13.0.0",
"screeps-api": "^1.7.2"