feat: add debug logging

Add debug logs using the `debug` library.

To use this new feature, set the `DEBUG` environment variable:
- `DEBUG=mineping:*` enables all logs from this library.
- `DEBUG=mineping:java` enables logs for the Java module only.
- `DEBUG=mineping:bedrock` enables logs for the Bedrock module only.
This commit is contained in:
2025-06-19 02:14:04 +03:00
parent c7b99cb6db
commit 7322034aba
4 changed files with 45 additions and 5 deletions

9
package-lock.json generated
View File

@ -1,13 +1,16 @@
{
"name": "@minescope/mineping",
"version": "1.6.1",
"version": "1.7.0-beta.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@minescope/mineping",
"version": "1.6.1",
"version": "1.7.0-beta.0",
"license": "MIT",
"dependencies": {
"debug": "^4.4.1"
},
"devDependencies": {
"vitest": "^3.2.3"
},
@ -917,7 +920,6 @@
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
@ -1067,7 +1069,6 @@
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
"license": "MIT"
},
"node_modules/nanoid": {