nekos 3.0.0 → 3.1.0
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 +2 -2
- package/dist/index.cjs +5 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ nekos({ colors: ["#ff00ff", "#00ffff"] });
|
|
|
41
41
|
nekos({ id: "sad_cat", colors: ["RANDOM", "RANDOM"] });
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
[ESM Example - demo.js](test/demo.js)
|
|
44
|
+
[ESM Example - demo.js](test/demo.js)
|
|
45
45
|
[CJS Example - demo.cjs](test/demo.cjs)
|
|
46
46
|
|
|
47
47
|
---
|
|
@@ -147,7 +147,7 @@ nekos({ colors: ["#ff00ff", "#00ffff"] });
|
|
|
147
147
|
nekos({ id: "sad_cat", colors: ["RANDOM", "RANDOM"] });
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
[ESM Example - demo.js](test/demo.js)
|
|
150
|
+
[ESM Example - demo.js](test/demo.js)
|
|
151
151
|
[CJS Example - demo.cjs](test/demo.cjs)
|
|
152
152
|
|
|
153
153
|
---
|
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,7 @@ __export(cjs_entry_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(cjs_entry_exports);
|
|
35
35
|
var import_fs = __toESM(require("fs"));
|
|
36
36
|
var import_path = __toESM(require("path"));
|
|
37
|
+
var import_consola = require("consola");
|
|
37
38
|
var import_color = require("@randplus/color");
|
|
38
39
|
var import_gradient_string = __toESM(require("gradient-string"));
|
|
39
40
|
var aaDir = import_path.default.join(__dirname, "../aa");
|
|
@@ -80,8 +81,11 @@ function nekos(options = {}) {
|
|
|
80
81
|
processedColors = [colors];
|
|
81
82
|
}
|
|
82
83
|
} else if (Array.isArray(colors)) {
|
|
84
|
+
if (colors.includes("RAINBOW")) {
|
|
85
|
+
import_consola.consola.warn("Cannot use the value, 'RAINBOW' in array.");
|
|
86
|
+
}
|
|
83
87
|
processedColors = colors.map(
|
|
84
|
-
(
|
|
88
|
+
(color2) => typeof color2 === "string" && color2.toUpperCase() === "RANDOM" ? (0, import_color.hex)("#") : color2
|
|
85
89
|
);
|
|
86
90
|
} else {
|
|
87
91
|
processedColors = colors;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
type
|
|
1
|
+
type SingleColorKeyword = "RAINBOW";
|
|
2
|
+
type ColorKeyword = "RANDOM";
|
|
2
3
|
type HexColor = `#${string}`;
|
|
3
4
|
type ColorValue = ColorKeyword | HexColor;
|
|
4
5
|
interface NekosOptions {
|
|
5
6
|
id?: string;
|
|
6
|
-
colors?: ColorValue | ColorValue[];
|
|
7
|
+
colors?: SingleColorKeyword | ColorValue | ColorValue[];
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
10
|
* Logs a cat ASCII art to the console.
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
|
+
import { consola } from "consola";
|
|
5
6
|
import { hex } from "@randplus/color";
|
|
6
7
|
import gradient from "gradient-string";
|
|
7
8
|
var __filename = fileURLToPath(import.meta.url);
|
|
@@ -50,8 +51,11 @@ function nekos(options = {}) {
|
|
|
50
51
|
processedColors = [colors];
|
|
51
52
|
}
|
|
52
53
|
} else if (Array.isArray(colors)) {
|
|
54
|
+
if (colors.includes("RAINBOW")) {
|
|
55
|
+
consola.warn("Cannot use the value, 'RAINBOW' in array.");
|
|
56
|
+
}
|
|
53
57
|
processedColors = colors.map(
|
|
54
|
-
(
|
|
58
|
+
(color2) => typeof color2 === "string" && color2.toUpperCase() === "RANDOM" ? hex("#") : color2
|
|
55
59
|
);
|
|
56
60
|
} else {
|
|
57
61
|
processedColors = colors;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nekos",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Let's have cute cats mess around in the log!",
|
|
5
5
|
"bin": {
|
|
6
6
|
"nekos": "bin/nekos.js"
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@randplus/color": "^3.0.0",
|
|
44
44
|
"commander": "^14.0.0",
|
|
45
|
+
"consola": "^3.4.2",
|
|
45
46
|
"gradient-string": "^3.0.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|