ubugeeei 1.0.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 ADDED
@@ -0,0 +1,20 @@
1
+ <h2>ubugeeei</h2>
2
+ <p>๐Ÿ‡ฏ๐Ÿ‡ต๐Ÿ—ผ software engineer / ๐Ÿฆ€ๅฝก..๏ฝกo ใ†ใซ๏ผŒ็ฆ…/ใ‚ตใƒ ใƒฉใ‚ค ๐Ÿฅท</p>
3
+
4
+ member of <a href="https://github.com/vuejs">@vuejs</a> (Official), <a href="https://github.com/vuejs-jp">@vuejs-jp</a> (Vue Fes Japan)<br>
5
+
6
+ king of <a href="https://github.com/chibivue-land">@chibivue-land</a><br>
7
+
8
+ working at <a href="https://github.com/mates-system" target="_blank">@mates-system</a><br>
9
+
10
+ creator of <a href="https://github.com/chibivue-land/chibivue" target="_blank">chibivue</a>, <a href="https://github.com/ubugeeei/vize" target="_blank">vize</a>, <a href="https://github.com/ubugeeei/ox-content" target="_blank">ox-content</a>, <a href="https://github.com/ubugeeei/relanote" target="_blank">relanote</a><br>
11
+
12
+ writing: <a href="https://wtrclred.io" target="_blank">wtrclred.io</a> (blog), <a href="https://github.com/ubugeei/reading-vuejs-core-vapor" target="_blank">reading-vuejs-core-vapor</a>,
13
+
14
+ ---
15
+
16
+ My Sponsors ๐Ÿ’š\
17
+ <img src="https://raw.githubusercontent.com/ubugeeei/sponsors/main/sponsors.png" width="320">
18
+
19
+ please sponsoring me!
20
+
Binary file
package/dist/cli.js ADDED
@@ -0,0 +1,203 @@
1
+ #!/usr/bin/env node
2
+ import { existsSync, readFileSync } from "node:fs";
3
+ import { fileURLToPath } from "node:url";
4
+ import { dirname, join } from "node:path";
5
+
6
+ //#region bin/cli.ts
7
+ const ESC = "\x1B";
8
+ const OSC = "\x1B]";
9
+ const BEL = "\x07";
10
+ const RESET = `${ESC}[0m`;
11
+ const BOLD = `${ESC}[1m`;
12
+ const rgb = (r, g, b) => `${ESC}[38;2;${r};${g};${b}m`;
13
+ const COLORS = {
14
+ black: rgb(0, 0, 0),
15
+ dark: rgb(40, 40, 40),
16
+ gray: rgb(100, 100, 100),
17
+ light: rgb(160, 160, 160),
18
+ border: rgb(80, 80, 80)
19
+ };
20
+ const link = (url, text) => `${OSC}8;;${url}${BEL}${text}${OSC}8;;${BEL}`;
21
+ const messages = {
22
+ en: {
23
+ greeting: "Hi there!",
24
+ name: "ubugeeei",
25
+ nickname: "ใ‚‚ใฎใฎใ‘็Ž‹",
26
+ tagline: "ใ†ใซใ‚’ใใ‚‰ใˆ ๐Ÿฆ€ๅฝก..๏ฝกo",
27
+ roles: [
28
+ {
29
+ text: "Vue.js Team Member",
30
+ url: null
31
+ },
32
+ {
33
+ text: "Vue.js JP Staff",
34
+ url: null
35
+ },
36
+ {
37
+ text: "chibivue-land King",
38
+ url: "https://chibivue.land"
39
+ }
40
+ ],
41
+ author: "Author of",
42
+ writing: "Writing",
43
+ github: "GitHub",
44
+ twitter: "Twitter",
45
+ discord: "Discord"
46
+ },
47
+ ja: {
48
+ greeting: "ใ”ใใ’ใ‚“ใ‚ˆใ†!",
49
+ name: "ubugeeei",
50
+ nickname: "ใ‚‚ใฎใฎใ‘็Ž‹",
51
+ tagline: "ใ†ใซใ‚’ใใ‚‰ใˆ ๐Ÿฆ€ๅฝก..๏ฝกo",
52
+ roles: [
53
+ {
54
+ text: "Vue.js ใƒกใƒณใƒใƒผ",
55
+ url: null
56
+ },
57
+ {
58
+ text: "Vue.js JP ใ‚นใ‚ฟใƒƒใƒ•",
59
+ url: null
60
+ },
61
+ {
62
+ text: "chibivue-land ็Ž‹",
63
+ url: "https://chibivue.land"
64
+ }
65
+ ],
66
+ author: "ไฝœ่€…",
67
+ writing: "ๅŸท็ญ†",
68
+ github: "GitHub",
69
+ twitter: "Twitter",
70
+ discord: "Discord"
71
+ }
72
+ };
73
+ function detectLocale() {
74
+ const args = process.argv.slice(2);
75
+ if (args.includes("--ja") || args.includes("-j") || args.includes("--japanese")) return "ja";
76
+ if (args.includes("--en") || args.includes("-e") || args.includes("--english")) return "en";
77
+ if ((process.env.LANG || process.env.LANGUAGE || process.env.LC_ALL || "").toLowerCase().startsWith("ja")) return "ja";
78
+ return "en";
79
+ }
80
+ function supportsKittyProtocol() {
81
+ return process.env.TERM === "xterm-kitty" || process.env.TERM_PROGRAM === "WezTerm" || !!process.env.KITTY_WINDOW_ID;
82
+ }
83
+ function supportsItermProtocol() {
84
+ return process.env.TERM_PROGRAM === "iTerm.app" || process.env.LC_TERMINAL === "iTerm2";
85
+ }
86
+ function renderKittyImage(base64Data, width) {
87
+ const chunks = [];
88
+ const chunkSize = 4096;
89
+ for (let i = 0; i < base64Data.length; i += chunkSize) {
90
+ const chunk = base64Data.slice(i, i + chunkSize);
91
+ const isLast = i + chunkSize >= base64Data.length;
92
+ chunks.push(`${ESC}_Ga=T,f=100,c=${width},m=${isLast ? 0 : 1};${chunk}${ESC}\\`);
93
+ }
94
+ return chunks.join("");
95
+ }
96
+ function renderItermImage(base64Data, width) {
97
+ return `${OSC}1337;File=inline=1;width=${width}:${base64Data}${BEL}`;
98
+ }
99
+ function loadAvatar() {
100
+ const avatarPath = join(dirname(fileURLToPath(import.meta.url)), "..", "assets", "avatar.png");
101
+ if (existsSync(avatarPath)) return readFileSync(avatarPath).toString("base64");
102
+ return null;
103
+ }
104
+ function renderAvatar() {
105
+ const avatarBase64 = loadAvatar();
106
+ if (!avatarBase64) return "";
107
+ if (supportsKittyProtocol()) return renderKittyImage(avatarBase64, 6);
108
+ else if (supportsItermProtocol()) return renderItermImage(avatarBase64, 6);
109
+ return "";
110
+ }
111
+ const projects = [
112
+ {
113
+ name: "chibivue",
114
+ url: "https://github.com/chibivue-land/chibivue"
115
+ },
116
+ {
117
+ name: "vize",
118
+ url: "https://github.com/ubugeeei/vize"
119
+ },
120
+ {
121
+ name: "ox-content",
122
+ url: "https://github.com/ubugeeei/ox-content"
123
+ },
124
+ {
125
+ name: "relanote",
126
+ url: "https://github.com/ubugeeei/relanote"
127
+ },
128
+ {
129
+ name: "vuefes-website",
130
+ url: "https://github.com/vuejs-jp/vuefes-2025-website"
131
+ },
132
+ {
133
+ name: "learn.nuxt.com",
134
+ url: "https://github.com/vuejs-jp/learn.nuxt.com"
135
+ },
136
+ {
137
+ name: "jp-vue-companies",
138
+ url: "https://github.com/chibivue-land/japanese-companies-using-vuejs"
139
+ }
140
+ ];
141
+ function getDisplayWidth(str) {
142
+ const clean = str.replace(/\x1b\[[0-9;]*m|\x1b\]8;;[^\x07]*\x07/g, "");
143
+ let width = 0;
144
+ for (const char of clean) {
145
+ const code = char.codePointAt(0) || 0;
146
+ if (code >= 4352 && code <= 4447 || code >= 11904 && code <= 40959 || code >= 44032 && code <= 55203 || code >= 63744 && code <= 64255 || code >= 65040 && code <= 65055 || code >= 65072 && code <= 65135 || code >= 65280 && code <= 65376 || code >= 65504 && code <= 65510 || code >= 127744 && code <= 129535 || code >= 131072 && code <= 196607) width += 2;
147
+ else width += 1;
148
+ }
149
+ return width;
150
+ }
151
+ function padRight(str, targetWidth) {
152
+ const padding = targetWidth - getDisplayWidth(str);
153
+ return str + " ".repeat(Math.max(0, padding));
154
+ }
155
+ const WIDTH = 62;
156
+ const INNER_WIDTH = WIDTH - 4;
157
+ function createLine(content) {
158
+ const border = COLORS.border;
159
+ return `${border}โ”‚${RESET} ${padRight(content, INNER_WIDTH)} ${border}โ”‚${RESET}`;
160
+ }
161
+ function main() {
162
+ const t = messages[detectLocale()];
163
+ const border = COLORS.border;
164
+ const topBorder = `${border}โ”Œ${"โ”€".repeat(WIDTH - 2)}โ”${RESET}`;
165
+ const bottomBorder = `${border}โ””${"โ”€".repeat(WIDTH - 2)}โ”˜${RESET}`;
166
+ const projectLinks = projects.map((p) => link(p.url, COLORS.dark + p.name + RESET));
167
+ const lines = [
168
+ "",
169
+ topBorder,
170
+ createLine(""),
171
+ createLine(`${BOLD}${COLORS.black}${t.name}${RESET} ${COLORS.gray}(${t.nickname})${RESET}`),
172
+ createLine(`${COLORS.light}${t.tagline}${RESET}`),
173
+ createLine(""),
174
+ createLine(`${COLORS.dark}${t.roles[0].text}${RESET}`),
175
+ createLine(`${COLORS.dark}${t.roles[1].text}${RESET}`),
176
+ createLine(t.roles[2].url ? `${link(t.roles[2].url, COLORS.dark + t.roles[2].text + RESET)}` : `${COLORS.dark}${t.roles[2].text}${RESET}`),
177
+ createLine(""),
178
+ createLine(`${COLORS.gray}${t.author}:${RESET} ${projectLinks.slice(0, 2).join(", ")}`),
179
+ createLine(` ${projectLinks.slice(2, 4).join(", ")}`),
180
+ createLine(` ${projectLinks.slice(4, 6).join(", ")}`),
181
+ createLine(` ${projectLinks.slice(6).join(", ")}`),
182
+ createLine(`${COLORS.gray}${t.writing}:${RESET} ${link("https://wtrclred.io", COLORS.dark + "wtrclred.io" + RESET)}`),
183
+ createLine(""),
184
+ createLine(`${COLORS.gray}${t.github}${RESET} ${link("https://github.com/ubugeeei", COLORS.dark + "github.com/ubugeeei" + RESET)}`),
185
+ createLine(`${COLORS.gray}${t.twitter}${RESET} ${link("https://x.com/ubugeeei", COLORS.dark + "@ubugeeei" + RESET)}`),
186
+ createLine(`${COLORS.gray}${t.discord}${RESET} ${link("https://discord.com/users/ubugeeei", COLORS.dark + "ubugeeei" + RESET)}`),
187
+ createLine(""),
188
+ bottomBorder,
189
+ ""
190
+ ];
191
+ console.log(lines.join("\n"));
192
+ const avatar = renderAvatar();
193
+ if (avatar && (supportsKittyProtocol() || supportsItermProtocol())) {
194
+ const lineCount = lines.length;
195
+ const moveUp = `${ESC}[${lineCount - 3}A`;
196
+ const moveRight = `${ESC}[46C`;
197
+ process.stdout.write(moveUp + moveRight + avatar + `${ESC}[${lineCount - 5}B\n`);
198
+ }
199
+ }
200
+ main();
201
+
202
+ //#endregion
203
+ export { };
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // This package is a CLI tool. Run with: npx ubugeeei
2
+ export default {};
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "ubugeeei",
3
+ "version": "1.0.0",
4
+ "description": "Hi! I'm ubugeeei, Vue.js team member, author of chibivue and vize",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "bin": {
8
+ "ubugeeei": "dist/cli.js"
9
+ },
10
+ "exports": {
11
+ ".": "./index.js"
12
+ },
13
+ "keywords": [
14
+ "cli",
15
+ "card",
16
+ "npx",
17
+ "vue",
18
+ "chibivue"
19
+ ],
20
+ "author": "ubugeeei",
21
+ "license": "MIT",
22
+ "homepage": "https://wtrclred.io",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/ubugeeei/ubugeeei.git"
26
+ },
27
+ "bugs": {
28
+ "url": "https://github.com/ubugeeei/ubugeeei/issues"
29
+ },
30
+ "funding": "https://github.com/sponsors/ubugeeei",
31
+ "engines": {
32
+ "node": ">=22.6.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^22.0.0",
36
+ "rolldown": "^1.0.0-beta.60",
37
+ "typescript": "^5.0.0"
38
+ },
39
+ "files": [
40
+ "dist",
41
+ "assets"
42
+ ],
43
+ "scripts": {
44
+ "build": "rolldown bin/cli.ts -d dist --platform node",
45
+ "dev": "node --experimental-strip-types --no-warnings bin/cli.ts"
46
+ }
47
+ }