@aristobyte-ui/cli 1.0.112 → 2.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.
Files changed (42) hide show
  1. package/bin/aristobyte-ui.js +3 -0
  2. package/dist/es/main/commands/add.js +106 -0
  3. package/dist/es/main/commands/doctor.js +166 -0
  4. package/dist/es/main/commands/env.js +175 -0
  5. package/dist/es/main/commands/init.js +180 -0
  6. package/dist/es/main/commands/list.js +195 -0
  7. package/dist/es/main/commands/remove.js +100 -0
  8. package/dist/es/main/commands/upgrade.js +122 -0
  9. package/dist/es/main/index.js +212 -0
  10. package/dist/es/main/utils/checkVersion.js +8 -0
  11. package/dist/es/main/utils/colors.js +77 -0
  12. package/dist/es/main/utils/compareVersions.js +11 -0
  13. package/dist/es/main/utils/getBanner.js +30 -0
  14. package/dist/es/main/utils/getCurrentPackageManager.js +55 -0
  15. package/dist/es/main/utils/getDescription.js +21 -0
  16. package/dist/es/main/utils/getTip.js +21 -0
  17. package/dist/es/main/utils/installPackage.js +75 -0
  18. package/dist/es/main/utils/parseHelp.js +22 -0
  19. package/dist/es/main/utils/typography.js +9 -0
  20. package/dist/lib/main/commands/add.js +112 -0
  21. package/dist/lib/main/commands/doctor.js +172 -0
  22. package/dist/lib/main/commands/env.js +181 -0
  23. package/dist/lib/main/commands/init.js +186 -0
  24. package/dist/lib/main/commands/list.js +202 -0
  25. package/dist/lib/main/commands/remove.js +106 -0
  26. package/dist/lib/main/commands/upgrade.js +128 -0
  27. package/dist/lib/main/index.js +217 -0
  28. package/dist/lib/main/utils/checkVersion.js +14 -0
  29. package/dist/lib/main/utils/colors.js +96 -0
  30. package/dist/lib/main/utils/compareVersions.js +14 -0
  31. package/dist/lib/main/utils/getBanner.js +33 -0
  32. package/dist/lib/main/utils/getCurrentPackageManager.js +61 -0
  33. package/dist/lib/main/utils/getDescription.js +24 -0
  34. package/dist/lib/main/utils/getTip.js +24 -0
  35. package/dist/lib/main/utils/installPackage.js +78 -0
  36. package/dist/lib/main/utils/parseHelp.js +25 -0
  37. package/dist/lib/main/utils/typography.js +13 -0
  38. package/package.json +12 -33
  39. package/dist/index.js +0 -1222
  40. package/dist/index.js.map +0 -1
  41. package/dist/index.mjs +0 -1221
  42. package/dist/index.mjs.map +0 -1
package/dist/index.mjs DELETED
@@ -1,1221 +0,0 @@
1
- #!/usr/bin/env node
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
-
28
- // ../../node_modules/picocolors/picocolors.js
29
- var require_picocolors = __commonJS({
30
- "../../node_modules/picocolors/picocolors.js"(exports, module) {
31
- "use strict";
32
- var p = process || {};
33
- var argv = p.argv || [];
34
- var env2 = p.env || {};
35
- var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
36
- var formatter = (open, close, replace = open) => (input) => {
37
- let string = "" + input, index = string.indexOf(close, open.length);
38
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
39
- };
40
- var replaceClose = (string, close, replace, index) => {
41
- let result = "", cursor = 0;
42
- do {
43
- result += string.substring(cursor, index) + replace;
44
- cursor = index + close.length;
45
- index = string.indexOf(close, cursor);
46
- } while (~index);
47
- return result + string.substring(cursor);
48
- };
49
- var createColors = (enabled = isColorSupported) => {
50
- let f = enabled ? formatter : () => String;
51
- return {
52
- isColorSupported: enabled,
53
- reset: f("\x1B[0m", "\x1B[0m"),
54
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
55
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
56
- italic: f("\x1B[3m", "\x1B[23m"),
57
- underline: f("\x1B[4m", "\x1B[24m"),
58
- inverse: f("\x1B[7m", "\x1B[27m"),
59
- hidden: f("\x1B[8m", "\x1B[28m"),
60
- strikethrough: f("\x1B[9m", "\x1B[29m"),
61
- black: f("\x1B[30m", "\x1B[39m"),
62
- red: f("\x1B[31m", "\x1B[39m"),
63
- green: f("\x1B[32m", "\x1B[39m"),
64
- yellow: f("\x1B[33m", "\x1B[39m"),
65
- blue: f("\x1B[34m", "\x1B[39m"),
66
- magenta: f("\x1B[35m", "\x1B[39m"),
67
- cyan: f("\x1B[36m", "\x1B[39m"),
68
- white: f("\x1B[37m", "\x1B[39m"),
69
- gray: f("\x1B[90m", "\x1B[39m"),
70
- bgBlack: f("\x1B[40m", "\x1B[49m"),
71
- bgRed: f("\x1B[41m", "\x1B[49m"),
72
- bgGreen: f("\x1B[42m", "\x1B[49m"),
73
- bgYellow: f("\x1B[43m", "\x1B[49m"),
74
- bgBlue: f("\x1B[44m", "\x1B[49m"),
75
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
76
- bgCyan: f("\x1B[46m", "\x1B[49m"),
77
- bgWhite: f("\x1B[47m", "\x1B[49m"),
78
- blackBright: f("\x1B[90m", "\x1B[39m"),
79
- redBright: f("\x1B[91m", "\x1B[39m"),
80
- greenBright: f("\x1B[92m", "\x1B[39m"),
81
- yellowBright: f("\x1B[93m", "\x1B[39m"),
82
- blueBright: f("\x1B[94m", "\x1B[39m"),
83
- magentaBright: f("\x1B[95m", "\x1B[39m"),
84
- cyanBright: f("\x1B[96m", "\x1B[39m"),
85
- whiteBright: f("\x1B[97m", "\x1B[39m"),
86
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
87
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
88
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
89
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
90
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
91
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
92
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
93
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
94
- };
95
- };
96
- module.exports = createColors();
97
- module.exports.createColors = createColors;
98
- }
99
- });
100
-
101
- // index.ts
102
- import { Command } from "commander";
103
-
104
- // commands/add.ts
105
- import { spinner, text } from "@clack/prompts";
106
-
107
- // utils/getCurrentPackageManager.ts
108
- import fs from "fs";
109
- import path from "path";
110
- function getCurrentPackageManager(cwd = process.cwd()) {
111
- const lockFiles = {
112
- bun: "bun.lockb",
113
- pnpm: "pnpm-lock.yaml",
114
- yarn: "yarn.lock",
115
- npm: "package-lock.json"
116
- };
117
- for (const [manager, lockFile] of Object.entries(lockFiles)) {
118
- if (fs.existsSync(path.join(cwd, lockFile))) {
119
- return manager;
120
- }
121
- }
122
- return "npm";
123
- }
124
-
125
- // commands/add.ts
126
- var import_picocolors2 = __toESM(require_picocolors());
127
-
128
- // utils/installPackage.ts
129
- import { execa } from "execa";
130
- async function installPackage(pkgManager, pkg, dev = false) {
131
- let args = [];
132
- switch (pkgManager) {
133
- case "npm":
134
- args = ["install", pkg, dev ? "--save-dev" : "--save"];
135
- break;
136
- case "yarn":
137
- args = ["add", pkg];
138
- if (dev) args.push("-D");
139
- break;
140
- case "pnpm":
141
- args = ["add", pkg];
142
- if (dev) args.push("-D");
143
- break;
144
- case "bun":
145
- args = ["add", pkg];
146
- if (dev) args.push("-d");
147
- break;
148
- default:
149
- throw new Error(`Unsupported package manager: ${pkgManager}`);
150
- }
151
- await execa(pkgManager, args, { stdio: "inherit" });
152
- }
153
-
154
- // commands/list.ts
155
- var import_picocolors = __toESM(require_picocolors());
156
- import fs2 from "fs";
157
- async function list(options, endBlock) {
158
- let handled = false;
159
- if (options.all) {
160
- handled = true;
161
- const url = "https://registry.npmjs.org/-/org/aristobyte-ui/package";
162
- const omit = ["cli", "react"];
163
- try {
164
- const res = await fetch(url);
165
- if (!res.ok) throw new Error(`Registry request failed: ${res.status}`);
166
- const data = await res.json();
167
- const packages = Object.keys(data).map((dep) => dep.split("/")[1]).filter((dep) => !omit.includes(dep)).sort();
168
- console.log(
169
- `${import_picocolors.default.green("\u25C7")} ${import_picocolors.default.white("Listing AristoByteUI packages:")}
170
- ${packages.map((dep) => `${import_picocolors.default.gray("|")} ${import_picocolors.default.cyan(dep)}`).join("\n")}`
171
- );
172
- } catch (err) {
173
- console.error(
174
- import_picocolors.default.red("\xD7 Failed to fetch package list from npm registry")
175
- );
176
- console.error(import_picocolors.default.dim(String(err)));
177
- }
178
- if (endBlock) console.log(import_picocolors.default.green("\u25C7"));
179
- process.exit(0);
180
- }
181
- if (options.installed) {
182
- handled = true;
183
- try {
184
- const pkgJson = JSON.parse(fs2.readFileSync("package.json", "utf-8"));
185
- const deps = pkgJson.dependencies || {};
186
- const aristobyteDeps = Object.keys(deps).filter((d) => d.startsWith("@aristobyte-ui/")).map((dep) => dep.includes("react") ? "all" : dep.split("/")[1]);
187
- console.log(
188
- `${import_picocolors.default.green("\u25C7")} ${import_picocolors.default.white("Listing installed AristoByteUI packages:")}
189
- ${aristobyteDeps.map((dep) => `${import_picocolors.default.gray("|")} ${import_picocolors.default.cyan(dep)}`).join("\n")}`
190
- );
191
- } catch (err) {
192
- console.error(import_picocolors.default.red("\xD7 Failed to list packages"), err);
193
- }
194
- if (endBlock) console.log(import_picocolors.default.green("\u25C7"));
195
- process.exit(0);
196
- }
197
- if (options.outdated) {
198
- handled = true;
199
- const packagesToUpdate = [];
200
- try {
201
- const pkgJson = JSON.parse(fs2.readFileSync("package.json", "utf-8"));
202
- const deps = pkgJson.dependencies || {};
203
- const installed = Object.keys(deps).filter(
204
- (d) => d.startsWith("@aristobyte-ui/")
205
- );
206
- if (installed.length === 0) {
207
- console.log(import_picocolors.default.yellow("No AristoByteUI packages installed."));
208
- process.exit(0);
209
- }
210
- console.log(
211
- `${import_picocolors.default.green("\u25C7")} ${import_picocolors.default.white("Checking for outdated AristoByteUI packages...")}`
212
- );
213
- for (const pkg of installed) {
214
- const localVersion = deps[pkg].replace(/^[^\d]*/, "");
215
- const registryUrl = `https://registry.npmjs.org/${pkg}`;
216
- try {
217
- const res = await fetch(registryUrl);
218
- if (!res.ok)
219
- throw new Error(`Registry request failed: ${res.status}`);
220
- const data = await res.json();
221
- const latest = data["dist-tags"]?.latest;
222
- if (!latest) continue;
223
- if (latest !== localVersion) {
224
- const p = pkg.replace("@aristobyte-ui/", "");
225
- packagesToUpdate.push([p, latest]);
226
- console.log(
227
- `${import_picocolors.default.gray("|")} ${import_picocolors.default.cyan(p)} ${import_picocolors.default.red(localVersion)} \u2192 ${import_picocolors.default.green(latest)}`
228
- );
229
- }
230
- } catch (err) {
231
- console.error(
232
- import_picocolors.default.red(`\xD7 Failed to check ${pkg} on npm registry`),
233
- err
234
- );
235
- }
236
- }
237
- } catch (err) {
238
- console.error(import_picocolors.default.red("\xD7 Failed to check outdated packages"), err);
239
- }
240
- const pkgManager = getCurrentPackageManager();
241
- if (endBlock)
242
- console.log(
243
- `${import_picocolors.default.gray("|")}
244
- ${import_picocolors.default.green("\u25C7")} ${packagesToUpdate.length > 0 ? import_picocolors.default.gray(`Tip: run '${pkgManager} upgrade ${packagesToUpdate.map((p) => `${p[0]}@${p[1]}`).join(" ")}'`) : import_picocolors.default.green("\u2714 Everything is up to date!")}`
245
- );
246
- process.exit(0);
247
- }
248
- if (!handled) {
249
- console.log(
250
- import_picocolors.default.gray(
251
- "No option provided. Use 'aristobyte-ui list --help' for usage."
252
- )
253
- );
254
- }
255
- }
256
-
257
- // commands/add.ts
258
- var DEFAULT_PACKAGE = "all";
259
- async function add(component, options) {
260
- if (options.list) {
261
- await list({ all: true }, true);
262
- }
263
- const pkgManager = getCurrentPackageManager();
264
- if (options.packageManager) {
265
- console.log(`${import_picocolors2.default.cyan("Current package manager:")}
266
- ${import_picocolors2.default.green("\u25C7")} ${pkgManager}`);
267
- process.exit(0);
268
- }
269
- const s = spinner();
270
- let packageName = DEFAULT_PACKAGE;
271
- if (!component) {
272
- console.log(
273
- `${import_picocolors2.default.green("\u25C7")} ${import_picocolors2.default.white("You did not specify, which package should be added")}
274
- ${import_picocolors2.default.gray("|")} ${import_picocolors2.default.gray("Please select one of the packages below listed to proceed.")}
275
- ${import_picocolors2.default.gray("|")}`
276
- );
277
- await list({ all: true });
278
- packageName = await text({
279
- message: "Component name to add (Enter to install all components)",
280
- placeholder: DEFAULT_PACKAGE,
281
- defaultValue: DEFAULT_PACKAGE
282
- });
283
- } else {
284
- packageName = component;
285
- }
286
- try {
287
- s.start(`Installing ${packageName}...`);
288
- const pkgManager2 = getCurrentPackageManager();
289
- if (packageName === "all") {
290
- await installPackage(pkgManager2, "@aristobyte-ui/react");
291
- s.stop();
292
- console.log(import_picocolors2.default.green("\u2714 All components installed!"));
293
- return;
294
- }
295
- const pkgName = `@aristobyte-ui/${packageName}`;
296
- await installPackage(pkgManager2, pkgName);
297
- s.stop();
298
- console.log(import_picocolors2.default.green(`\u2714 Component ${packageName} installed!`));
299
- } catch (err) {
300
- s.stop();
301
- console.error(import_picocolors2.default.red(`\xD7 Failed to install package ${packageName}`), err);
302
- }
303
- }
304
-
305
- // commands/init.ts
306
- var import_picocolors3 = __toESM(require_picocolors());
307
- import { execa as execa2 } from "execa";
308
- import { select, text as text2, spinner as spinner2 } from "@clack/prompts";
309
- var TEMPLATES = [
310
- {
311
- id: "aristobyte-ui-template-nextjs-15-app-router",
312
- name: "Next App Router",
313
- desc: "A Next.js 15 with app-router directory template pre-configured with AristoByteUI.",
314
- repo: "https://github.com/aristobyte-team/aristobyte-ui-template-nextjs-15-app-router.git"
315
- },
316
- {
317
- id: "aristobyte-ui-template-nextjs-15-pages",
318
- name: "Next Pages",
319
- desc: "A Next.js 15 with pages directory template pre-configured with AristoByteUI.",
320
- repo: "https://github.com/aristobyte-team/aristobyte-ui-template-nextjs-15-pages.git"
321
- },
322
- {
323
- id: "aristobyte-ui-template-vite",
324
- name: "Vite",
325
- desc: "A Vite template pre-configured with AristoByteUI.",
326
- repo: "https://github.com/aristobyte-team/aristobyte-ui-template-vite.git"
327
- },
328
- {
329
- id: "aristobyte-ui-template-vike",
330
- name: "Vike",
331
- desc: "A Vike template pre-configured with AristoByteUI.",
332
- repo: "https://github.com/aristobyte-team/aristobyte-ui-template-vike.git"
333
- },
334
- {
335
- id: "aristobyte-ui-template-astro",
336
- name: "Astro",
337
- desc: "An Astro template pre-configured with AristoByteUI.",
338
- repo: "https://github.com/aristobyte-team/aristobyte-ui-template-astro.git"
339
- },
340
- {
341
- id: "aristobyte-ui-template-rsbuild",
342
- name: "RS Build",
343
- desc: "An RS Build template pre-configured with AristoByteUI.",
344
- repo: "https://github.com/aristobyte-team/aristobyte-ui-template-rsbuild.git"
345
- }
346
- ];
347
- var PACKAGE_MANAGERS = ["npm", "yarn", "pnpm", "bun"];
348
- var DEFAULT_NAME = "aristobyte-ui-app";
349
- async function init(myProjectName, options) {
350
- if (options.listTemplates) {
351
- console.log(`${import_picocolors3.default.cyan("Available templates:")}
352
- ${TEMPLATES.map(
353
- (t) => `${import_picocolors3.default.green("\u25C7")} ${t.id.split("aristobyte-ui-template-")[1]} - ${import_picocolors3.default.gray(t.desc)}`
354
- ).join("\n")}`);
355
- process.exit(0);
356
- }
357
- if (options.listPackageManagers) {
358
- console.log(
359
- `${import_picocolors3.default.cyan("Available package managers:")}
360
- ${PACKAGE_MANAGERS.map((pm) => `${import_picocolors3.default.green("\u25C7")} ${pm}`).join("\n")}`
361
- );
362
- process.exit(0);
363
- }
364
- console.log(import_picocolors3.default.cyan("\u250C Create a new project"));
365
- let projectName = myProjectName || DEFAULT_NAME;
366
- if (!myProjectName) {
367
- projectName = await text2({
368
- message: "New project name (Enter to skip with default name)",
369
- placeholder: DEFAULT_NAME,
370
- defaultValue: DEFAULT_NAME
371
- });
372
- } else {
373
- console.log(
374
- `${import_picocolors3.default.gray("\u2502")}
375
- ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.white("Your project name is:")}
376
- ${import_picocolors3.default.gray("\u2502")} ${import_picocolors3.default.green(projectName)}`
377
- );
378
- }
379
- let template = TEMPLATES.find(
380
- (t) => t.id === `aristobyte-ui-template-${options?.template?.toLowerCase()?.replaceAll(" ", "")}`
381
- );
382
- if (!template) {
383
- const templateIndex = await select({
384
- message: "Select a template (Enter to select)",
385
- options: TEMPLATES.map((t, i) => ({
386
- value: i.toString(),
387
- label: `${t.name} (${t.desc})`
388
- }))
389
- });
390
- template = TEMPLATES[Number(templateIndex)];
391
- } else {
392
- console.log(
393
- `${import_picocolors3.default.gray("\u2502")}
394
- ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.white("Template selected:")}
395
- ${import_picocolors3.default.gray("\u2502")} ${import_picocolors3.default.green(template.name)}`
396
- );
397
- }
398
- let packageManager = PACKAGE_MANAGERS.find(
399
- (pm) => pm.toLowerCase() === options.packageManager?.toLowerCase()
400
- );
401
- if (!packageManager) {
402
- const packageManagerIndex = await select({
403
- message: "Select a package manager (Enter to select)",
404
- options: PACKAGE_MANAGERS.map((pm, i) => ({
405
- value: i.toString(),
406
- label: pm
407
- }))
408
- });
409
- packageManager = PACKAGE_MANAGERS[Number(packageManagerIndex)];
410
- } else {
411
- console.log(
412
- `${import_picocolors3.default.gray("\u2502")}
413
- ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.white("Package manager selected:")}
414
- ${import_picocolors3.default.gray("\u2502")} ${import_picocolors3.default.green(packageManager)}`
415
- );
416
- }
417
- console.log(
418
- `${import_picocolors3.default.gray("\u2502")}
419
- ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.cyan("Template created successfully!")}
420
- ${import_picocolors3.default.gray("\u2502")}`
421
- );
422
- const s = spinner2();
423
- try {
424
- s.start(
425
- `Preparing '${template.name}' with ${packageManager} configuration...`
426
- );
427
- await execa2(
428
- "git",
429
- [
430
- "clone",
431
- "--branch",
432
- packageManager,
433
- "--single-branch",
434
- template.repo,
435
- projectName
436
- ],
437
- { stdio: "ignore" }
438
- );
439
- await execa2("rm", ["-rf", ".git"], { cwd: projectName, stdio: "ignore" });
440
- s.stop(`${import_picocolors3.default.green("\u2714 Project initialized successfully!")}`);
441
- console.log(
442
- `
443
- ${import_picocolors3.default.gray("\u2502")}
444
- ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.cyan("To get started:")}
445
- ${import_picocolors3.default.gray("\u2502")}
446
- ${import_picocolors3.default.gray("\u251C\u2500")} ${import_picocolors3.default.white("cd " + projectName)}
447
- ${import_picocolors3.default.gray("\u251C\u2500")} ${import_picocolors3.default.white(`${packageManager} install`)}
448
- ${import_picocolors3.default.gray("\u251C\u2500")} ${import_picocolors3.default.white(`${packageManager} run dev`)}`
449
- );
450
- } catch (err) {
451
- s.stop();
452
- console.error(import_picocolors3.default.red("\xD7 Failed to initialize project"), err);
453
- }
454
- }
455
-
456
- // commands/remove.ts
457
- var import_picocolors4 = __toESM(require_picocolors());
458
- import { spinner as spinner3, text as text3 } from "@clack/prompts";
459
- import { execa as execa3 } from "execa";
460
- async function remove(component, options) {
461
- if (options.list) {
462
- await list({ installed: true }, true);
463
- }
464
- const pkgManager = getCurrentPackageManager();
465
- if (options.packageManager) {
466
- console.log(`${import_picocolors4.default.cyan("Current package manager:")}
467
- ${import_picocolors4.default.green("\u25C7")} ${pkgManager}`);
468
- process.exit(0);
469
- }
470
- const s = spinner3();
471
- let packageName;
472
- if (!component) {
473
- console.log(
474
- `${import_picocolors4.default.green("\u25C7")} ${import_picocolors4.default.white("You did not specify, which package should be removed")}
475
- ${import_picocolors4.default.gray("|")} ${import_picocolors4.default.gray("Please select one of the installed packages below to proceed.")}
476
- ${import_picocolors4.default.gray("|")}`
477
- );
478
- await list({ installed: true });
479
- packageName = await text3({
480
- message: `Component name to remove (Required filled)`,
481
- placeholder: "<package-name>"
482
- });
483
- } else {
484
- packageName = component;
485
- }
486
- if (!packageName) {
487
- console.log(
488
- import_picocolors4.default.red(
489
- `Invalid Package name. <package-name> should be specified:
490
- aristobyte-ui remove <package-name>`
491
- )
492
- );
493
- return;
494
- }
495
- try {
496
- const pkgName = packageName === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${packageName}`;
497
- s.start(`Removing ${pkgName}...`);
498
- await execa3(pkgManager, ["remove", pkgName], { stdio: "inherit" });
499
- s.stop();
500
- console.log(import_picocolors4.default.green(`\u2714 ${pkgName} removed successfully!`));
501
- } catch (err) {
502
- s.stop();
503
- console.error(
504
- import_picocolors4.default.red(`\xD7 Failed to remove component ${packageName}`),
505
- err
506
- );
507
- }
508
- }
509
-
510
- // commands/upgrade.ts
511
- var import_picocolors5 = __toESM(require_picocolors());
512
- import { spinner as spinner4 } from "@clack/prompts";
513
- import { execa as execa4 } from "execa";
514
- async function upgrade(component, options) {
515
- if (!component && !options.all) {
516
- console.error(import_picocolors5.default.red("\xD7 No component specified for upgrade."));
517
- console.log(
518
- import_picocolors5.default.gray(
519
- "Use: 'aristobyte-ui upgrade <component>' or 'aristobyte-ui upgrade --all'"
520
- )
521
- );
522
- process.exit(0);
523
- }
524
- const s = spinner4();
525
- const pkgManager = getCurrentPackageManager();
526
- try {
527
- const isAll = options.all || component === "all";
528
- const targets = isAll ? ["@aristobyte-ui/react"] : component ? [`@aristobyte-ui/${component}`] : [];
529
- if (targets.length === 0) {
530
- console.error(import_picocolors5.default.red("\xD7 No component specified for upgrade."));
531
- console.log(
532
- import_picocolors5.default.gray("Use: aristobyte-ui upgrade <component> or --all")
533
- );
534
- process.exit(1);
535
- }
536
- const versionSuffix = options.to ? `@${options.to}` : "";
537
- const sLabel = isAll ? "Upgrading all AristoByteUI components..." : `Upgrading ${targets.join(", ")}...`;
538
- s.start(sLabel);
539
- for (const pkg of targets) {
540
- const fullSpecifier = `${pkg}${versionSuffix}`;
541
- await execa4(pkgManager, ["upgrade", fullSpecifier], {
542
- stdio: "inherit"
543
- });
544
- }
545
- s.stop();
546
- console.log(
547
- import_picocolors5.default.green(
548
- `\u2714 Upgrade complete${options.to ? ` \u2192 version ${options.to}` : ""}!`
549
- )
550
- );
551
- } catch (err) {
552
- s.stop();
553
- console.error(import_picocolors5.default.red(`\xD7 Upgrade failed.`));
554
- console.error(import_picocolors5.default.dim(String(err)));
555
- }
556
- }
557
-
558
- // commands/doctor.ts
559
- var import_picocolors7 = __toESM(require_picocolors());
560
- import fs3 from "fs";
561
- import path2 from "path";
562
- import os from "os";
563
- import { execSync } from "child_process";
564
- import { spinner as spinner5 } from "@clack/prompts";
565
-
566
- // utils/compareVersions.ts
567
- function compareVersions(v1, v2) {
568
- const a = v1.replace(/^v/, "").split(".").map(Number);
569
- const b = v2.replace(/^v/, "").split(".").map(Number);
570
- for (let i = 0; i < 3; i++) {
571
- if (a[i] > b[i]) return 1;
572
- if (a[i] < b[i]) return -1;
573
- }
574
- return 0;
575
- }
576
-
577
- // utils/checkVersion.ts
578
- var import_picocolors6 = __toESM(require_picocolors());
579
- function checkVersion(name, version, minVersion) {
580
- if (version === "unknown" || compareVersions(version, minVersion) < 0) {
581
- return import_picocolors6.default.red(`\xD7 ${name} >= ${minVersion} required`);
582
- }
583
- return import_picocolors6.default.green(`\u2714 ${version}`);
584
- }
585
-
586
- // commands/doctor.ts
587
- var MIN_VERSIONS = {
588
- node: "20.19.0",
589
- pnpm: "10.15.1",
590
- npm: "10.8.2",
591
- yarn: "1.22.22",
592
- bun: "1.2.21"
593
- };
594
- function getVersion(command, name) {
595
- try {
596
- return execSync(command).toString().trim();
597
- } catch (err) {
598
- console.error(import_picocolors7.default.red(`\xD7 Failed to detect ${name} version:`), err);
599
- return "unknown";
600
- }
601
- }
602
- function hasProjectPackage(name) {
603
- try {
604
- const pkgJson = JSON.parse(fs3.readFileSync("package.json", "utf-8"));
605
- return pkgJson.dependencies && pkgJson.dependencies[name] || pkgJson.devDependencies && pkgJson.devDependencies[name];
606
- } catch {
607
- return false;
608
- }
609
- }
610
- function detectUISetup() {
611
- const configPaths = [
612
- "tailwind.config.js",
613
- "tailwind.config.ts",
614
- "postcss.config.js",
615
- "postcss.config.ts"
616
- ];
617
- return configPaths.filter((p) => fs3.existsSync(path2.resolve(p)));
618
- }
619
- async function checkNetwork() {
620
- try {
621
- const res = await fetch(
622
- "https://registry.npmjs.org/-/org/aristobyte-ui/package",
623
- { method: "HEAD" }
624
- );
625
- return res.ok;
626
- } catch {
627
- return false;
628
- }
629
- }
630
- async function doctor(options) {
631
- const s = spinner5();
632
- try {
633
- s.start("Running doctor diagnostics\u2026");
634
- console.log(
635
- `${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Doctor Diagnostics")}
636
- ${import_picocolors7.default.gray("|")}`
637
- );
638
- const system = {
639
- os: `${os.type()} ${os.release()} (${os.platform()})`,
640
- cpu: os.cpus()[0].model,
641
- memoryMB: Math.round(os.totalmem() / 1024 / 1024),
642
- node: getVersion("node -v", "Node")
643
- };
644
- const pkgManager = getCurrentPackageManager();
645
- const pmVersion = getVersion(`${pkgManager} -v`, pkgManager);
646
- const uiInstalled = hasProjectPackage("@aristobyte-ui/react");
647
- const pluginInstalled = hasProjectPackage("@aristobyte-ui/plugin");
648
- const configs = detectUISetup();
649
- let networkOnline;
650
- if (options.network || options.all || Object.keys(options).length === 0) {
651
- networkOnline = await checkNetwork();
652
- }
653
- const payload = {
654
- system,
655
- packageManager: { name: pkgManager, version: pmVersion },
656
- installedPackages: { ui: uiInstalled, plugin: pluginInstalled },
657
- configs,
658
- network: networkOnline
659
- };
660
- if (options.json) {
661
- console.log(
662
- `${import_picocolors7.default.gray("|")}
663
- ${import_picocolors7.default.gray("\u25C7 ------ JSON start ------ \u25C7")}
664
- ${JSON.stringify(payload, null, 2)}
665
- ${import_picocolors7.default.gray("\u25C7 ------ JSON end ------ \u25C7")}
666
- ${import_picocolors7.default.gray("|")}`
667
- );
668
- }
669
- if (options.system || options.all || Object.keys(options).length === 0) {
670
- console.log(
671
- `${options.system ? "" : "\n"}${import_picocolors7.default.gray("|")}
672
- ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("System:")}
673
- ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("OS:")} ${import_picocolors7.default.green(system.os)}
674
- ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("CPU:")} ${import_picocolors7.default.green(system.cpu)}
675
- ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("Memory:")} ${import_picocolors7.default.green(`${system.memoryMB} MB`)}
676
- ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("Node:")} ${checkVersion("Node", system.node, MIN_VERSIONS.node)}`
677
- );
678
- }
679
- if (options.pm || options.all || Object.keys(options).length === 0) {
680
- console.log(
681
- `${import_picocolors7.default.gray("|")}
682
- ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Package Manager:")}
683
- ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("Current:")} ${import_picocolors7.default.green(pkgManager)}
684
- ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("Version:")} ${checkVersion(pkgManager, pmVersion, MIN_VERSIONS[pkgManager])}`
685
- );
686
- }
687
- if (options.deps || options.all || Object.keys(options).length === 0) {
688
- console.log(
689
- `${import_picocolors7.default.gray("|")}
690
- ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Project Dependencies:")}
691
- ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("@aristobyte-ui/react:")} ${uiInstalled ? import_picocolors7.default.green("\u2714 Installed") : import_picocolors7.default.red("\xD7 Missing")}
692
- ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("@aristobyte-ui/plugin:")} ${pluginInstalled ? import_picocolors7.default.green("\u2714 Installed") : import_picocolors7.default.red("\xD7 Missing")}`
693
- );
694
- }
695
- if (options.configs || options.all || Object.keys(options).length === 0) {
696
- console.log(
697
- `${import_picocolors7.default.gray("|")}
698
- ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Config Files:")}`
699
- );
700
- if (!configs.length) {
701
- console.log(
702
- `${import_picocolors7.default.gray("|")} ${import_picocolors7.default.red("\xD7 No config files detected")}`
703
- );
704
- } else {
705
- configs.forEach(
706
- (cfg) => console.log(
707
- `${import_picocolors7.default.gray("|")} ${import_picocolors7.default.green("\u2714")} ${import_picocolors7.default.white(cfg)}`
708
- )
709
- );
710
- }
711
- }
712
- if ((options.network || options.all || Object.keys(options).length === 0) && networkOnline !== void 0) {
713
- console.log(
714
- `${options.network ? "\n" : ""}${import_picocolors7.default.gray("|")}
715
- ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Network:")}
716
- ${import_picocolors7.default.gray("|")} ${networkOnline ? `${import_picocolors7.default.green("\u2714")} ${import_picocolors7.default.white("Registry reachable")}` : `${import_picocolors7.default.red("\xD7")} ${import_picocolors7.default.white("Registry unreachable")}`}`
717
- );
718
- }
719
- console.log(import_picocolors7.default.gray("|"));
720
- s.stop(import_picocolors7.default.green("\u2714 Doctor diagnostics finished successfully!"));
721
- } catch (err) {
722
- s.stop(import_picocolors7.default.red("\xD7 Doctor diagnostics failed"));
723
- console.error(import_picocolors7.default.red("\xD7 Diagnostics crashed"), err);
724
- }
725
- }
726
-
727
- // commands/env.ts
728
- import os2 from "os";
729
- import fs4 from "fs";
730
- import { execSync as execSync2 } from "child_process";
731
- import { spinner as spinner6 } from "@clack/prompts";
732
- var import_picocolors8 = __toESM(require_picocolors());
733
- var MIN_VERSIONS2 = {
734
- node: "20.19.0",
735
- pnpm: "10.15.1",
736
- npm: "10.8.2",
737
- yarn: "1.22.22",
738
- bun: "1.2.21"
739
- };
740
- function getVersion2(command, name) {
741
- try {
742
- return execSync2(command).toString().trim();
743
- } catch (err) {
744
- console.error(import_picocolors8.default.red(`\xD7 Failed to detect ${name} version:`), err);
745
- return "unknown";
746
- }
747
- }
748
- function getSystemInfo() {
749
- return {
750
- os: `${os2.type()} ${os2.release()} (${os2.platform()})`,
751
- cpu: os2.cpus()[0].model,
752
- memoryMB: Math.round(os2.totalmem() / 1024 / 1024),
753
- node: getVersion2("node -v", "Node")
754
- };
755
- }
756
- function getPackageManagerInfo() {
757
- const current = getCurrentPackageManager();
758
- return {
759
- packageManager: current,
760
- version: getVersion2(`${current} -v`, current)
761
- };
762
- }
763
- function getInstalledPackages() {
764
- try {
765
- const pkgJson = JSON.parse(fs4.readFileSync("package.json", "utf-8"));
766
- const deps = pkgJson.dependencies || {};
767
- return Object.keys(deps).filter((d) => d.startsWith("@aristobyte-ui/")).map((dep) => dep.includes("react") ? "all" : dep.split("/")[1]);
768
- } catch {
769
- return [];
770
- }
771
- }
772
- async function checkNetwork2() {
773
- const url = "https://registry.npmjs.org/-/org/aristobyte-ui/package";
774
- try {
775
- const res = await fetch(url, { method: "HEAD" });
776
- return res.ok;
777
- } catch {
778
- return false;
779
- }
780
- }
781
- async function env(options) {
782
- const s = spinner6();
783
- try {
784
- s.start("Collecting environment diagnostics\u2026");
785
- console.log(
786
- `${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Environment Diagnostics")}
787
- ${import_picocolors8.default.gray("|")}`
788
- );
789
- const system = getSystemInfo();
790
- const pm = getPackageManagerInfo();
791
- const installed = options.packages || options.all || Object.keys(options).length === 0 ? getInstalledPackages() : [];
792
- const networkOnline = options.network || options.all || Object.keys(options).length === 0 ? await checkNetwork2() : void 0;
793
- const payload = {
794
- system,
795
- packageManager: pm,
796
- installedPackages: installed,
797
- network: networkOnline
798
- };
799
- if (options.json) {
800
- console.log(`${import_picocolors8.default.gray("|")}
801
- ${import_picocolors8.default.gray("\u25C7 ------ JSON file start ------ \u25C7")}
802
- ${JSON.stringify(payload, null, 2)}
803
- ${import_picocolors8.default.gray("\u25C7 ------ JSON file end ------ \u25C7")}
804
- ${import_picocolors8.default.gray("|")}`);
805
- }
806
- if (options.system || options.all || Object.keys(options).length === 0) {
807
- console.log(`${options.all || Object.keys(options).length === 0 ? "\n" : ""}${import_picocolors8.default.gray("|")}
808
- ${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("System:")}
809
- ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("OS:")} ${import_picocolors8.default.green(`${system.os}`)}
810
- ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("CPU:")} ${import_picocolors8.default.green(`${system.cpu}`)}
811
- ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("Memory:")} ${import_picocolors8.default.green(`${system.memoryMB} MB`)}
812
- ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("Node:")} ${checkVersion("Node", system.node, MIN_VERSIONS2.node)}`);
813
- }
814
- if (options.pm || options.all || Object.keys(options).length === 0) {
815
- console.log(`${import_picocolors8.default.gray("|")}
816
- ${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Package Manager:")}
817
- ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("Current:")} ${import_picocolors8.default.green(pm.packageManager)}
818
- ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("Version:")} ${import_picocolors8.default.green(
819
- checkVersion(
820
- pm.packageManager,
821
- pm.version,
822
- MIN_VERSIONS2[pm.packageManager]
823
- )
824
- )}`);
825
- }
826
- if (options.packages || options.all || Object.keys(options).length === 0) {
827
- console.log(
828
- `${import_picocolors8.default.gray("|")}
829
- ${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Installed AristoByteUI Packages:")}`
830
- );
831
- if (!installed.length) {
832
- console.log(import_picocolors8.default.gray(" (none detected)"));
833
- } else {
834
- installed.forEach(
835
- (p) => console.log(
836
- `${import_picocolors8.default.gray("|")} ${import_picocolors8.default.green("-")} ${import_picocolors8.default.white(p)}`
837
- )
838
- );
839
- }
840
- }
841
- if (options.network || options.all || Object.keys(options).length === 0) {
842
- console.log(`${options.network ? "\n" : ""}${import_picocolors8.default.gray("|")}
843
- ${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Network:")}
844
- ${import_picocolors8.default.gray("|")} ${networkOnline ? `${import_picocolors8.default.green("\u2714")} ${import_picocolors8.default.white('Registry reachable"')}` : `${import_picocolors8.default.red("\xD7")} ${import_picocolors8.default.white("Registry unreachable")}`}`);
845
- }
846
- console.log(import_picocolors8.default.gray("|"));
847
- s.stop(import_picocolors8.default.green("\u2714 Environment diagnostics finished with success!"));
848
- } catch (err) {
849
- s.stop(import_picocolors8.default.red("\xD7 Environment diagnostics finished with failure :("));
850
- console.error(import_picocolors8.default.red("\xD7 Environment diagnostics failed"), err);
851
- }
852
- }
853
-
854
- // utils/colors.ts
855
- import chalk from "chalk";
856
- import gradient from "gradient-string";
857
- var LOGO_COLORS = ["#ffee27", "#fec800", "#f18e35", "#e95f32", "#e2312d"];
858
- function logo3(text4) {
859
- return chalk.hex(LOGO_COLORS[2])(text4);
860
- }
861
- function logo4(text4) {
862
- return chalk.hex(LOGO_COLORS[3])(text4);
863
- }
864
- function lightGrey(text4) {
865
- return chalk.hex("#afbfff")(text4);
866
- }
867
- function darkGrey(text4) {
868
- return chalk.hex("#7580aa")(text4);
869
- }
870
- function logoGradient(text4) {
871
- return gradient([
872
- ...LOGO_COLORS,
873
- ...LOGO_COLORS.reverse(),
874
- ...LOGO_COLORS,
875
- ...LOGO_COLORS.reverse(),
876
- ...LOGO_COLORS
877
- ]).multiline(text4);
878
- }
879
- function logoSmallGradient(text4) {
880
- return gradient([
881
- LOGO_COLORS[0],
882
- LOGO_COLORS[1],
883
- LOGO_COLORS[1],
884
- LOGO_COLORS[0],
885
- LOGO_COLORS[0],
886
- LOGO_COLORS[1]
887
- ]).multiline(text4);
888
- }
889
-
890
- // utils/typography.ts
891
- function usage(params) {
892
- return params.map((param) => `${logo4("[")} ${lightGrey(param)} ${logo4("]")}`).join(" ");
893
- }
894
- function description(text4) {
895
- return darkGrey(`- ${text4}`);
896
- }
897
-
898
- // utils/getBanner.ts
899
- var mainBanner = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
900
- \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2591 \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588
901
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588
902
- \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591 \u2591\u2591\u2591\u2588\u2588\u2588\u2591 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2591\u2588\u2588\u2588\u2591 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588
903
- \u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2591 \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588
904
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2591\u2591\u2591
905
- \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588
906
- \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591
907
- \u2588\u2588\u2588 \u2591\u2588\u2588\u2588
908
- \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588
909
- \u2591\u2591\u2591\u2591\u2591\u2591 `;
910
- var initBanner = ` \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
911
- \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2591 \u2591\u2591\u2588\u2588\u2588
912
- \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
913
- \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2591\u2588\u2588\u2588\u2591
914
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
915
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588
916
- \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588
917
- \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 `;
918
- var addBanner = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
919
- \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588
920
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
921
- \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588
922
- \u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
923
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
924
- \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588
925
- \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 `;
926
- var removeBanner = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588
927
- \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588
928
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588
929
- \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588
930
- \u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588
931
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2591 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2591
932
- \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588
933
- \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 `;
934
- var doctorBanner = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
935
- \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588
936
- \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588
937
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2588\u2588\u2588\u2591 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588
938
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2588\u2588\u2588 \u2591\u2591\u2591 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2591
939
- \u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
940
- \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
941
- \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 `;
942
- var envBanner = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588
943
- \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588
944
- \u2591\u2588\u2588\u2588 \u2588 \u2591 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
945
- \u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588
946
- \u2591\u2588\u2588\u2588\u2591\u2591\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
947
- \u2591\u2588\u2588\u2588 \u2591 \u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588
948
- \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588
949
- \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 `;
950
- var listBanner = ` \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
951
- \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2591 \u2591\u2591\u2588\u2588\u2588
952
- \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
953
- \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591 \u2591\u2591\u2591\u2588\u2588\u2588\u2591
954
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
955
- \u2591\u2588\u2588\u2588 \u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588
956
- \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588
957
- \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 `;
958
- var upgradeBanner = ` \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
959
- \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588
960
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588
961
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588
962
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2591 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588
963
- \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2591
964
- \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588
965
- \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2588\u2588\u2588\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591
966
- \u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588
967
- \u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588
968
- \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 `;
969
- function getBanner(id) {
970
- switch (id) {
971
- case "add":
972
- return logoGradient(addBanner);
973
- case "doctor":
974
- return logoGradient(doctorBanner);
975
- case "env":
976
- return logoGradient(envBanner);
977
- case "init":
978
- return logoGradient(initBanner);
979
- case "list":
980
- return logoGradient(listBanner);
981
- case "remove":
982
- return logoGradient(removeBanner);
983
- case "upgrade":
984
- return logoGradient(upgradeBanner);
985
- case "aristobyte-ui":
986
- default:
987
- return logoGradient(mainBanner);
988
- }
989
- }
990
-
991
- // utils/getTip.ts
992
- function getTip(id) {
993
- switch (id) {
994
- case "init":
995
- return "Run 'aristobyte-ui init' or 'aristobyte-ui init [ myProject ] --template <templateName> --package-manager <packageManagerName>' to bootstrap a new project quickly.\n Use interactive prompts to customize or provide flags for automation.";
996
- case "add":
997
- return "Use 'aristobyte-ui add [ component ]' to install a specific UI component.\n Combine multiple components for faster setup.";
998
- case "remove":
999
- return "Run 'aristobyte-ui remove [ component ]' to cleanly uninstall components.\n Useful for maintaining a lightweight project.";
1000
- case "upgrade":
1001
- return "Use 'aristobyte-ui upgrade [ component ]' to update components or core packages.\n Add '--all' to upgrade everything at once.";
1002
- case "list":
1003
- return "Run 'aristobyte-ui list' to view installed components and versions.\n Add '--outdated' to check for available updates.";
1004
- case "doctor":
1005
- return "Execute 'aristobyte-ui doctor' to analyze your setup.\n Fixes and recommendations will be displayed for common issues.";
1006
- case "env":
1007
- return "Run 'aristobyte-ui env' to inspect your development environment.\n Helpful for debugging version or configuration conflicts.";
1008
- case "aristobyte-ui":
1009
- default:
1010
- return "Use 'aristobyte-ui [ command ] --help' for detailed info on a command.";
1011
- }
1012
- }
1013
-
1014
- // utils/getDescription.ts
1015
- function getDescription(id) {
1016
- switch (id) {
1017
- case "init":
1018
- return "Initialize a new AristoByteUI project from pre-configured templates.\n Supports automatic project setup, template selection, and package manager configuration.";
1019
- case "add":
1020
- return "Add new UI components to your existing AristoByteUI project.\n Handles component installation, configuration, and dependency management.";
1021
- case "remove":
1022
- return "Remove installed AristoByteUI components cleanly from your project.\n Ensures proper cleanup of related files and dependencies.";
1023
- case "upgrade":
1024
- return "Upgrade AristoByteUI components or core packages to their latest versions.\n Supports selective or full project upgrades.";
1025
- case "list":
1026
- return "List all installed AristoByteUI components in your project.\n Displays version, status, and available updates for each component.";
1027
- case "doctor":
1028
- return "Run a system and project health check.\n Detects configuration issues, missing dependencies, and environment mismatches.";
1029
- case "env":
1030
- return "Display detailed environment information.\n Includes Node.js version, package manager details, and AristoByteUI configuration paths.";
1031
- case "aristobyte-ui":
1032
- default:
1033
- return "Create new AristoByteUI projects or manage existing projects with full control\n over components, dependencies, and UI stack configuration. Supports initialization,\n addition, removal, upgrading of components, and project diagnostics.";
1034
- }
1035
- }
1036
-
1037
- // utils/parseHelp.ts
1038
- function parseHelp(cmd, helper) {
1039
- return `
1040
- ${getBanner(cmd.name())}
1041
-
1042
- ${logoSmallGradient("Usage:")}
1043
- ${logo3(helper.commandUsage(cmd))}
1044
-
1045
- ${logoSmallGradient("Description:")}
1046
- ${darkGrey(getDescription(cmd.name()))}
1047
-
1048
- ${helper.visibleCommands(cmd).length > 0 ? `${logoSmallGradient("Commands:")}
1049
- ${helper.visibleCommands(cmd).map(
1050
- (c) => ` ${`${logo3(c.name()).padEnd(31)} ${c.usage() || "".padEnd(30)}`.padEnd(129)} ${description(c.description())}`
1051
- ).join("\n")}
1052
-
1053
- ` : ""}${helper.visibleOptions(cmd).length > 0 ? `${logoSmallGradient("Options:")}
1054
- ${helper.visibleOptions(cmd).map(
1055
- (option) => ` ${`${logo3(option.flags.split(/,\s*/)[0])}${darkGrey(", ")}${logo4(option.flags.split(/,\s*/)[1])}`.padEnd(93)} ${description(option.description)}`
1056
- ).join("\n")}
1057
-
1058
- ` : ""}${logoSmallGradient("Tip:")}
1059
- ${lightGrey(getTip(cmd.name()))}
1060
- `;
1061
- }
1062
-
1063
- // package.json
1064
- var package_default = {
1065
- name: "@aristobyte-ui/cli",
1066
- description: "The official AristoByteUI CLI \u2014 initialize projects, install, upgrade, remove, and manage UI components seamlessly.",
1067
- version: "1.0.112",
1068
- license: "MIT",
1069
- private: false,
1070
- author: "AristoByte <info@aristobyte.com>",
1071
- homepage: "https://www.npmjs.com/package/@aristobyte-ui/cli",
1072
- repository: {
1073
- type: "git",
1074
- url: "git+https://github.com/aristobyte-team/aristobyte-ui.git",
1075
- directory: "./"
1076
- },
1077
- bugs: {
1078
- url: "https://github.com/aristobyte-team/aristobyte-ui.git/issues"
1079
- },
1080
- engines: {
1081
- node: ">=20.17.0",
1082
- npm: ">=10.8.2",
1083
- yarn: ">=1.22.22"
1084
- },
1085
- keywords: [
1086
- "aristobyte",
1087
- "cli",
1088
- "ui",
1089
- "components",
1090
- "typescript",
1091
- "node",
1092
- "developer-tools",
1093
- "project-bootstrap",
1094
- "package-management"
1095
- ],
1096
- files: [
1097
- "dist"
1098
- ],
1099
- publishConfig: {
1100
- access: "public"
1101
- },
1102
- main: "dist/index.js",
1103
- module: "dist/index.mjs",
1104
- bin: {
1105
- "aristobyte-ui": "dist/index.js"
1106
- },
1107
- exports: {
1108
- ".": {
1109
- import: "./dist/index.mjs",
1110
- require: "./dist/index.js"
1111
- }
1112
- },
1113
- scripts: {
1114
- build: "tsup",
1115
- "build:watch": "tsup ./index.ts --watch",
1116
- dev: "tsup && node ./bin/aristobyte-ui.js",
1117
- start: "node ./bin/aristobyte-ui.js",
1118
- lint: "eslint . --ext .ts,.tsx --max-warnings 0",
1119
- "lint:fix": "eslint . --ext .ts,.tsx --fix",
1120
- "check-types": "tsc --noEmit"
1121
- },
1122
- dependencies: {
1123
- "@aristobyte-ui/eslint-config": "^1.0.112",
1124
- "@aristobyte-ui/typescript-config": "^1.0.112",
1125
- "@clack/prompts": "^0.11.0",
1126
- axios: "^1.6.0",
1127
- chalk: "^5.6.1",
1128
- commander: "^11.0.0",
1129
- execa: "^8.0.0",
1130
- "gradient-string": "^3.0.0"
1131
- },
1132
- devDependencies: {
1133
- "@changesets/changelog-github": "^0.5.1",
1134
- "@changesets/cli": "^2.29.6",
1135
- "@types/node": "^24.3.1",
1136
- eslint: "^9.35.0",
1137
- "ts-node": "^10.9.2",
1138
- tsup: "^8.5.0",
1139
- typescript: "^5.9.2"
1140
- }
1141
- };
1142
-
1143
- // index.ts
1144
- var COMMANDS = [
1145
- "init",
1146
- "add",
1147
- "remove",
1148
- "upgrade",
1149
- "list",
1150
- "doctor",
1151
- "env",
1152
- "help"
1153
- ];
1154
- var aristobyteui = new Command();
1155
- aristobyteui.name("aristobyte-ui").usage(usage(["command", "options"])).description(
1156
- "Create new AristoByteUI projects or manage existing projects with full control\n over components, dependencies, and UI stack configuration. Supports initialization,\n addition, removal, upgrading of components, and project diagnostics."
1157
- ).version(package_default.version, "-V, --version", "Output the CLI version").helpOption("-H, --help", "Show help information").configureHelp({
1158
- formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1159
- });
1160
- aristobyteui.command("init [myProjectName]").usage(usage(["options", "myProjectName"])).description("Initialize a new AristoByteUI project").option("-LT, --list-templates", "Display a list of available templates").option(
1161
- "-LPM, --list-package-managers",
1162
- "Display a list of available package managers"
1163
- ).option("-T, --template <templateName>", "Specify a template to use").option(
1164
- "-P, --package-manager <packageManager>",
1165
- "Select a package manager (npm, yarn, pnpm, bun)"
1166
- ).configureHelp({
1167
- formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1168
- }).action(init);
1169
- aristobyteui.command("add [component]").usage(usage(["options", "components..."])).description("Add a UI component").option("-L, --list", "Display a list of available packages, to be added").option(
1170
- "-P, --package-manager",
1171
- "Show the package manager used in current project"
1172
- ).configureHelp({
1173
- formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1174
- }).action(add);
1175
- aristobyteui.command("remove [component]").usage(usage(["options", "components..."])).description("Remove a UI component").option("-L, --list", "Display a list of installed packages, to be removed").option(
1176
- "-P, --package-manager",
1177
- "Show the package manager used in current project"
1178
- ).configureHelp({
1179
- formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1180
- }).action(remove);
1181
- aristobyteui.command("upgrade [component]").usage(usage(["options", "components..."])).description("Upgrade a UI component").option("-A, --all", "Upgrade all AristoByteUI components").option("-T, --to <version>", "Upgrade to a specific version").configureHelp({
1182
- formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1183
- }).action(upgrade);
1184
- aristobyteui.command("list").usage(usage(["options"])).description("List installed components").option("-A, --all", "Display the list of all packages").option("-I, --installed", "Display the list of installed packages").option("-O, --outdated", "Check for available updates").configureHelp({
1185
- formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1186
- }).action((options) => list(options, true));
1187
- aristobyteui.command("doctor").usage(usage(["options"])).description("Check system and project health").option("-A, --all", "Run all diagnostics").option("-C, --configs", "Validate project config files").option("-D, --deps", "Validate installed AristoByteUI dependencies").option("-J, --json", "Output diagnostics as JSON").option("-N, --network", "Verify registry/network connectivity").option("-P, --pm", "Check package manager state").option("-S, --system", "Check system environment").configureHelp({
1188
- formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1189
- }).action(doctor);
1190
- aristobyteui.command("env").usage(usage(["options"])).description("Display environment info").option("-A, --all", "Display all environment diagnostics").option("-J, --json", "Output environment info as JSON").option("-M, --pm", "Show package manager details").option("-N, --network", "Check registry/network connectivity").option("-P, --packages", "Show installed AristoByteUI packages").option("-S, --system", "Show system information").configureHelp({
1191
- formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1192
- }).action(env);
1193
- aristobyteui.command("help").usage(usage(["options"])).description("Display help for command").action(env);
1194
- aristobyteui.command("help", { hidden: true });
1195
- aristobyteui.exitOverride(async (err) => {
1196
- if (err.code === "commander.unknownCommand") {
1197
- console.error(
1198
- logoSmallGradient(" \u25C6 Possible commands are: \n"),
1199
- ...COMMANDS.map(
1200
- (cmd) => cmd === err.message.split("Did you mean ")[1].split("?")[0] ? `${logoSmallGradient("\u2502 ")}${logo4("\u25CF aristobyte-ui")} ${logo4(`${cmd}`)}
1201
- ` : `${logoSmallGradient("\u2502 \u25CB aristobyte-ui")} ${logo3(`${cmd}`)}
1202
- `
1203
- )
1204
- );
1205
- }
1206
- process.exit(1);
1207
- });
1208
- (async () => {
1209
- const args = process.argv.slice(2);
1210
- if (args.length === 0) {
1211
- aristobyteui.outputHelp();
1212
- process.exit(0);
1213
- }
1214
- try {
1215
- await aristobyteui.parseAsync(args, { from: "user" });
1216
- } catch (err) {
1217
- console.error(darkGrey("Error:"), lightGrey(err.message));
1218
- process.exit(1);
1219
- }
1220
- })();
1221
- //# sourceMappingURL=index.mjs.map