@deitylamb/mcping 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -91,10 +91,11 @@ async function main() {
91
91
  const resolvedStr = `${res.target.ip}:${res.target.port}`;
92
92
  const targetDisplay = parsed.target === resolvedStr ? parsed.target : `${parsed.target} ${colors.gray}→${colors.reset} ${resolvedStr}`;
93
93
  console.log(`\n ${colors.bright}${targetDisplay}${colors.reset}`);
94
- const editionStr = `${colors.bright}${res.type.toUpperCase()}${colors.reset}`;
95
- const versionStr = `${colors.gray}${res.version.name}${colors.reset}`;
96
- const latencyStr = res.type === "java" ? ` ${colors.magenta}${res.latency}ms${colors.reset}` : "";
97
- console.log(` ${editionStr} ${colors.gray}•${colors.reset} ${versionStr}${latencyStr}`);
94
+ const editionStr = `${res.type === "java" ? colors.cyan : colors.green}${colors.bright}${res.type.toUpperCase()}${colors.reset}`;
95
+ const versionStr = `${colors.white}${res.version.name}${colors.reset}`;
96
+ const protocolStr = `${colors.gray}(${res.version.protocol})${colors.reset}`;
97
+ const latencyStr = ` ${colors.magenta}${res.latency}ms${colors.reset}`;
98
+ console.log(` ${editionStr} ${colors.gray}•${colors.reset} ${versionStr} ${protocolStr} ${colors.gray}•${colors.reset}${latencyStr}`);
98
99
  console.log(` ${colors.bright}${res.players.online}${colors.reset} ${colors.gray}/ ${res.players.max} players${colors.reset}`);
99
100
  const cleanMotd = mcToAnsi(res.motd).trim().split("\n").map((line) => line.trim()).filter((line) => line.length > 0).join(`\n `);
100
101
  console.log(`\n ${cleanMotd}${colors.reset}\n`);
package/dist/cli.mjs CHANGED
@@ -91,10 +91,11 @@ async function main() {
91
91
  const resolvedStr = `${res.target.ip}:${res.target.port}`;
92
92
  const targetDisplay = parsed.target === resolvedStr ? parsed.target : `${parsed.target} ${colors.gray}→${colors.reset} ${resolvedStr}`;
93
93
  console.log(`\n ${colors.bright}${targetDisplay}${colors.reset}`);
94
- const editionStr = `${colors.bright}${res.type.toUpperCase()}${colors.reset}`;
95
- const versionStr = `${colors.gray}${res.version.name}${colors.reset}`;
96
- const latencyStr = res.type === "java" ? ` ${colors.magenta}${res.latency}ms${colors.reset}` : "";
97
- console.log(` ${editionStr} ${colors.gray}•${colors.reset} ${versionStr}${latencyStr}`);
94
+ const editionStr = `${res.type === "java" ? colors.cyan : colors.green}${colors.bright}${res.type.toUpperCase()}${colors.reset}`;
95
+ const versionStr = `${colors.white}${res.version.name}${colors.reset}`;
96
+ const protocolStr = `${colors.gray}(${res.version.protocol})${colors.reset}`;
97
+ const latencyStr = ` ${colors.magenta}${res.latency}ms${colors.reset}`;
98
+ console.log(` ${editionStr} ${colors.gray}•${colors.reset} ${versionStr} ${protocolStr} ${colors.gray}•${colors.reset}${latencyStr}`);
98
99
  console.log(` ${colors.bright}${res.players.online}${colors.reset} ${colors.gray}/ ${res.players.max} players${colors.reset}`);
99
100
  const cleanMotd = mcToAnsi(res.motd).trim().split("\n").map((line) => line.trim()).filter((line) => line.length > 0).join(`\n `);
100
101
  console.log(`\n ${cleanMotd}${colors.reset}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deitylamb/mcping",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Minecraft server ping library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",