11 Commits

Author SHA1 Message Date
7248a0096c
feat: add typescript declaration files
Types are automatically generated from the existsing
JSDoc comments in the js source code. Use `types:build`
script from `package.json` to produce d.ts files.
2025-06-22 01:50:29 +03:00
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
envizar
73a2fffe8b
feat: add virtualHost option (#6) 2025-02-07 08:01:12 +03:00
9469564736
docs: update references to wiki.vg
wiki.vg has been shut down and is in the process of being merged into minecraft.wiki
2024-12-28 22:47:11 +03:00
sya-ri
13e6b8c6ff
fix(types): Change options to optional 2023-12-09 22:38:37 +09:00
Egornya
d9bf4cfb3f feat(pingJava): add protocolVersion
feat(types): `PingOptions` for Java

fix(types): type names

fix(types): type names
2023-12-08 16:04:35 +04: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
sya-ri
31c58ee637 Update outdated JavaPingResponse type 2023-10-22 06:04:58 +09:00
1249fa7632
docs(docs): сhanged the module name according to the scope, added links to src files 2022-01-11 02:47:14 +03:00
9827dd60e2
style(types): the PingOptions type was removed from index.d.ts file
The PingOptions type was moved from index.d.ts to lib/bedrock.d.ts
2022-01-11 02:36:01 +03:00
e9cd348935
initial commit 2022-01-10 23:21:47 +03:00