7 Commits

Author SHA1 Message Date
3c2c049c19
refactor!: decouple Raknet MOTD parsing and response shaping
The previous implementation of the RakNet ping was monolithic, mixing
socket management, raw packet validation, and data transformation into
a single, complex flow.

This refactor introduces a clear, multi-stage
processing pipeline that separates these concerns. The logic is now
broken down into multi-stage pipeline: extracting the MOTD string
from the raw pong packet -> parsing that string into a raw
object -> transforming the raw data into a
user-friendly response object.

Additionally, the socket handling logic is improved
with idempotent cleanup function to prevent resource
leaks or race conditions.

As part of this overhaul, external TypeScript definition (`.d.ts`)
files have been removed in favor of rich JSDoc annotations.

BREAKING CHANGE: The structure of the resolved `BedrockPingResponse`
object has been significantly changed to improve clarity and
consistency.
2025-06-16 03:36:26 +03:00
d90a916fa5
docs: update cli app example 2025-02-07 08:56:39 +03:00
88ad92e59d
chore: add example for single server ping 2024-10-09 21:55:01 +03:00
0aa73655b1
fix(parallel.js): add break statement to stop iterating over results if a promise is rejected 2023-10-22 21:38:34 +03:00
910184bf5f
refactoring and comments
fix(cli.js): refactor help and error handling logic for better readability and maintainability
feat(cli.js): add support for custom port and timeout options
fix(parallel.js): update list of hosts to ping
fix(bedrock.js): add comments and improve error handling in ping function
fix(java.js): add comments and improve error handling in ping function
fix(varint.js): add comments to functions and improve readability
fix(index.d.ts): export all functions from java.js and bedrock.js
fix(lib/bedrock.d.ts): update source link
fix(lib/java.d.ts): update source link
2023-10-22 21:32:00 +03:00
0fe675385f
bedrock.js refactoring, remove bytebuffer dependency
add parallel.js file to demonstrate parallel pinging of multiple Bedrock servers
2023-10-22 02:29:20 +03:00
e9cd348935
initial commit 2022-01-10 23:21:47 +03:00