nekos 3.1.0 → 3.2.2

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/CONTRIBUTING.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  We welcome contributions! If you want to add a new ASCII art, please follow these rules.
4
4
 
5
+ ## Required Process
6
+
7
+ ### Setup
8
+
9
+ ```bash
10
+ npm install
11
+ ```
12
+
13
+ ### Test
14
+
15
+ ```bash
16
+ npm run build
17
+ npm run test
18
+ ```
19
+
5
20
  ## Adding New ASCII Art
6
21
 
7
22
  You can add new cat ASCII art to the `aa/` directory. A pull request is required to add a file.
@@ -24,6 +39,21 @@ Thank you for your contribution! 🐱
24
39
 
25
40
  コントリビューションを歓迎します!新しいアスキーアートを追加したい場合は、以下のルールに従ってください。
26
41
 
42
+ ## 必要な手順
43
+
44
+ ### セットアップ
45
+
46
+ ```bash
47
+ npm install
48
+ ```
49
+
50
+ ### テスト
51
+
52
+ ```bash
53
+ npm run build
54
+ npm run test
55
+ ```
56
+
27
57
  ## 新しいアスキーアートの追加
28
58
 
29
59
  `aa/` ディレクトリに新しい猫のアスキーアートを追加できます。ファイルを追加するにはプルリクエストが必要です。
package/README.md CHANGED
@@ -2,8 +2,13 @@
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/nekos.svg)](https://badge.fury.io/js/nekos)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
5
6
  [![Validate AA Contribution](https://github.com/otoneko1102/nekos/actions/workflows/validate-aa.yml/badge.svg)](https://github.com/otoneko110/nekos/actions/workflows/validate-aa.yml)
6
7
 
8
+ <a href="https://www.buymeacoffee.com/devuloper" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
9
+
10
+ <a href='https://ko-fi.com/E1E41LY2C9' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi6.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
11
+
7
12
  A simple CLI tool to display cat ASCII art in your console.
8
13
 
9
14
  ![sample](img/sample.png)
@@ -63,18 +68,27 @@ nekos
63
68
 
64
69
  # Display a specific cat by ID
65
70
  nekos --id my_cat
71
+ nekos -i my_cat
66
72
 
67
73
  # Display a cat with a rainbow gradient
68
74
  nekos --colors RAINBOW
75
+ nekos -c RAINBOW
69
76
 
70
77
  # Display a cat with two random gradient colors
71
78
  nekos --colors RANDOM RANDOM
79
+ nekos -c RANDOM RANDOM
72
80
 
73
81
  # Display a specific cat with a custom gradient
74
82
  nekos --id sad_cat --colors "#ff00ff" "#00ffff"
83
+ nekos -i sad_cat -c "#ff00ff" "#00ffff"
75
84
 
76
85
  # You can also use npx without a global installation
77
86
  npx nekos --colors "#ff00ff #00ffff"
87
+ npx nekos -c "#ff00ff" "#00ffff"
88
+
89
+ # Check the current version.
90
+ nekos --version
91
+ nekos -v
78
92
  ```
79
93
 
80
94
  ---
@@ -169,18 +183,27 @@ nekos
169
183
 
170
184
  # IDを指定して特定の猫を表示
171
185
  nekos --id my_cat
186
+ nekos -i
172
187
 
173
188
  # 虹色のグラデーションで猫を表示
174
189
  nekos --colors RAINBOW
190
+ nekos -c RAINBOW
175
191
 
176
192
  # 2色のランダムなグラデーションで猫を表示
177
193
  nekos --colors RANDOM RANDOM
194
+ nekos -c RANDOM RANDOM
178
195
 
179
196
  # IDを指定した猫にカスタムグラデーションを適用
180
197
  nekos --id sad_cat --colors "#ff00ff" "#00ffff"
198
+ nekos -i sad_cat -c "#ff00ff" "#00ffff"
181
199
 
182
200
  # グローバルインストールなしでnpxを使っても実行できます
183
201
  npx nekos --colors "#ff00ff #00ffff"
202
+ npx nekos -c "#ff00ff" "#00ffff"
203
+
204
+ # 現在のバージョンを確認
205
+ nekos --version
206
+ nekos -v
184
207
  ```
185
208
 
186
209
  ---
package/aa/4w4.txt ADDED
@@ -0,0 +1,3 @@
1
+ /\_/\
2
+ (=4w4=)
3
+ (\")_(\")
package/aa/nya.txt ADDED
@@ -0,0 +1,4 @@
1
+ /\ /\
2
+ ( o o )
3
+ ( =^= )
4
+ (")_(")~ nya~
package/aa/o_o.txt ADDED
@@ -0,0 +1,3 @@
1
+ /\_/\
2
+ ( o_o )
3
+ > ^ <
package/aa/owo.txt ADDED
@@ -0,0 +1,3 @@
1
+ /\_/\
2
+ ( owo )
3
+ > ^ <
package/aa/zzz.txt ADDED
@@ -0,0 +1,3 @@
1
+ |\_._/|
2
+ ( -.- )
3
+ zzz
package/bin/nekos.js CHANGED
@@ -2,15 +2,32 @@
2
2
 
3
3
  import { program } from "commander";
4
4
  import nekos from "../dist/index.js";
5
+ import { consola } from "consola";
6
+ import { isPackageLatest } from "is-package-latest";
7
+ import pkg from "../package.json" with { type: "json" };
8
+
9
+ async function versionInfo(p) {
10
+ const res = await isPackageLatest(p);
11
+ if (!res.isLatest)
12
+ consola.warn(
13
+ `New version released! =^・w・^=\n\n${res.currentVersion} --> ${res.latestVersion}\n\nnpm install -g ${res.name}@latest`,
14
+ );
15
+ return p.version;
16
+ }
5
17
 
6
18
  program
19
+ .version(
20
+ await versionInfo(pkg),
21
+ "-v, --version",
22
+ "Check the current version.",
23
+ )
7
24
  .option(
8
25
  "-i, --id <id>",
9
- "Display a specific cat by its ID (filename without .txt)"
26
+ "Display a specific cat by its ID (filename without .txt)",
10
27
  )
11
28
  .option(
12
29
  "-c, --colors [colors...]",
13
- 'Specify colors (e.g., RANDOM, RAINBOW, #ff00ff, "#ff0000 #00ff00")'
30
+ 'Specify colors (e.g., RANDOM, RAINBOW, #ff00ff, "#ff0000 #00ff00")',
14
31
  );
15
32
 
16
33
  program.parse(process.argv);
@@ -24,7 +41,7 @@ if (options.id) {
24
41
 
25
42
  if (options.colors) {
26
43
  const finalColors = options.colors.flatMap((colorString) =>
27
- colorString.split(" ")
44
+ colorString.split(" "),
28
45
  );
29
46
 
30
47
  if (finalColors.length === 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nekos",
3
- "version": "3.1.0",
3
+ "version": "3.2.2",
4
4
  "description": "Let's have cute cats mess around in the log!",
5
5
  "bin": {
6
6
  "nekos": "bin/nekos.js"
@@ -16,9 +16,11 @@
16
16
  "scripts": {
17
17
  "test": "cross-env FORCE_COLOR=1 node --experimental-vm-modules node_modules/jest/bin/jest.js",
18
18
  "clean": "rimraf dist",
19
+ "format": "prettier --write .",
20
+ "format:check": "prettier --check .",
19
21
  "build:types": "tsc",
20
22
  "build:js": "node scripts/build.js",
21
- "build": "npm run clean && npm run build:types && npm run build:js"
23
+ "build": "npm run clean && npm run format && npm run build:types && npm run build:js"
22
24
  },
23
25
  "repository": {
24
26
  "type": "git",
@@ -43,13 +45,15 @@
43
45
  "@randplus/color": "^3.0.0",
44
46
  "commander": "^14.0.0",
45
47
  "consola": "^3.4.2",
46
- "gradient-string": "^3.0.0"
48
+ "gradient-string": "^3.0.0",
49
+ "is-package-latest": "^1.0.0"
47
50
  },
48
51
  "devDependencies": {
49
52
  "@types/node": "^24.3.0",
50
53
  "cross-env": "^10.0.0",
51
54
  "esbuild": "^0.25.9",
52
55
  "jest": "^30.1.1",
56
+ "prettier": "3.6.2",
53
57
  "rimraf": "^6.0.1",
54
58
  "typescript": "^5.9.2"
55
59
  }