mowojang-cli 0.4.7 → 0.4.9

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/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  ![NPM Version](https://img.shields.io/npm/v/mowojang-cli?label=NPM)
4
4
  ![NPM Downloads](https://img.shields.io/npm/dm/mowojang-cli?label=Downloads)
5
5
  ![NPM License](https://img.shields.io/npm/l/mowojang-cli?label=License)
6
+ ![Publish Size](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fpackagephobia.com%2Fv2%2Fapi.json%3Fp%3Dmowojang-cli&query=%24.publish.pretty&label=Publish%20Size)
7
+ ![Install Size](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fpackagephobia.com%2Fv2%2Fapi.json%3Fp%3Dmowojang-cli&query=%24.install.pretty&label=Install%20Size)
6
8
 
7
9
  ## Install
8
10
 
@@ -12,15 +14,17 @@
12
14
 
13
15
  ## Usage
14
16
 
17
+ `mowojang help`
18
+ or
15
19
  `mowojang-cli help`
16
20
 
17
21
  ```text
18
22
  mowojang/mowojang-cli
19
23
 
20
24
  Usage:
21
- mowojang-cli <command> [args] [options]
22
- or
23
25
  mowojang <command> [args] [options]
26
+ or
27
+ mowojang-cli <command> [args] [options]
24
28
 
25
29
  Commands:
26
30
  uuid <username> Get the UUID for a username
package/dist/index.js CHANGED
@@ -4,9 +4,9 @@ import { Client, validate, utils } from "mowojang";
4
4
  const help = `mowojang/mowojang-cli
5
5
 
6
6
  Usage:
7
- mowojang-cli <command> [args] [options]
8
- or
9
7
  mowojang <command> [args] [options]
8
+ or
9
+ mowojang-cli <command> [args] [options]
10
10
 
11
11
  Commands:
12
12
  uuid <username> Get the UUID for a username
@@ -210,13 +210,13 @@ try {
210
210
  if (!type || !value)
211
211
  throw new Error("Usage: validate <player|username> <value>");
212
212
  if (type === "player") {
213
- printJson({ value, valid: validate.player(value) });
213
+ print(String(validate.player(value)));
214
214
  }
215
215
  else if (type === "uuid") {
216
- printJson({ value, valid: validate.UUID(value) });
216
+ print(String(validate.UUID(value)));
217
217
  }
218
218
  else if (type === "username") {
219
- printJson({ value, valid: validate.username(value) });
219
+ print(String(validate.username(value)));
220
220
  }
221
221
  else {
222
222
  throw new Error("Validation type must be 'player' or 'username'.");
@@ -228,10 +228,10 @@ try {
228
228
  if (!action || !value)
229
229
  throw new Error("Usage: utils <dash|undash> <uuid>");
230
230
  if (action === "dash") {
231
- printJson({ input: value, output: utils.dashUUID(value) });
231
+ print(String(utils.dashUUID(value)));
232
232
  }
233
233
  else if (action === "undash") {
234
- printJson({ input: value, output: utils.undashUUID(value) });
234
+ print(String(utils.undashUUID(value)));
235
235
  }
236
236
  else {
237
237
  throw new Error("Utils action must be 'dash' or 'undash'.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mowojang-cli",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "CLI Wrapper for the mowojang npm package.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "author": "Pixelic",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "mowojang": "0.4.7"
24
+ "mowojang": "0.4.9"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^25.9.1",