@aristobyte-ui/cli 1.0.110 → 1.0.112

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/dist/index.mjs CHANGED
@@ -102,7 +102,28 @@ var require_picocolors = __commonJS({
102
102
  import { Command } from "commander";
103
103
 
104
104
  // commands/add.ts
105
- import { spinner } from "@clack/prompts";
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());
106
127
 
107
128
  // utils/installPackage.ts
108
129
  import { execa } from "execa";
@@ -130,54 +151,161 @@ async function installPackage(pkgManager, pkg, dev = false) {
130
151
  await execa(pkgManager, args, { stdio: "inherit" });
131
152
  }
132
153
 
133
- // utils/getCurrentPackageManager.ts
134
- import fs from "fs";
135
- import path from "path";
136
- function getCurrentPackageManager(cwd = process.cwd()) {
137
- const lockFiles = {
138
- bun: "bun.lockb",
139
- pnpm: "pnpm-lock.yaml",
140
- yarn: "yarn.lock",
141
- npm: "package-lock.json"
142
- };
143
- for (const [manager, lockFile] of Object.entries(lockFiles)) {
144
- if (fs.existsSync(path.join(cwd, lockFile))) {
145
- return manager;
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)));
146
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
+ );
147
254
  }
148
- return "npm";
149
255
  }
150
256
 
151
257
  // commands/add.ts
152
- var import_picocolors = __toESM(require_picocolors());
153
- async function add(component) {
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
+ }
154
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
+ }
155
286
  try {
156
- s.start(`Installing ${component}...`);
157
- const pkgManager = getCurrentPackageManager();
158
- if (component === "all") {
159
- await installPackage(pkgManager, "@aristobyte-ui/react");
287
+ s.start(`Installing ${packageName}...`);
288
+ const pkgManager2 = getCurrentPackageManager();
289
+ if (packageName === "all") {
290
+ await installPackage(pkgManager2, "@aristobyte-ui/react");
160
291
  s.stop();
161
- console.log(import_picocolors.default.green("\u2705 All components installed!"));
292
+ console.log(import_picocolors2.default.green("\u2714 All components installed!"));
162
293
  return;
163
294
  }
164
- const pkgName = `@aristobyte-ui/${component}`;
165
- await installPackage(pkgManager, pkgName);
295
+ const pkgName = `@aristobyte-ui/${packageName}`;
296
+ await installPackage(pkgManager2, pkgName);
166
297
  s.stop();
167
- console.log(import_picocolors.default.green(`\u2705 Component ${component} installed!`));
298
+ console.log(import_picocolors2.default.green(`\u2714 Component ${packageName} installed!`));
168
299
  } catch (err) {
169
300
  s.stop();
170
- console.error(
171
- import_picocolors.default.red(`\u274C Failed to install component ${component}`),
172
- err
173
- );
301
+ console.error(import_picocolors2.default.red(`\xD7 Failed to install package ${packageName}`), err);
174
302
  }
175
303
  }
176
304
 
177
305
  // commands/init.ts
178
- var import_picocolors2 = __toESM(require_picocolors());
306
+ var import_picocolors3 = __toESM(require_picocolors());
179
307
  import { execa as execa2 } from "execa";
180
- import { select, text, spinner as spinner2 } from "@clack/prompts";
308
+ import { select, text as text2, spinner as spinner2 } from "@clack/prompts";
181
309
  var TEMPLATES = [
182
310
  {
183
311
  id: "aristobyte-ui-template-nextjs-15-app-router",
@@ -218,30 +346,79 @@ var TEMPLATES = [
218
346
  ];
219
347
  var PACKAGE_MANAGERS = ["npm", "yarn", "pnpm", "bun"];
220
348
  var DEFAULT_NAME = "aristobyte-ui-app";
221
- async function init(myProjectName = DEFAULT_NAME) {
222
- console.log(import_picocolors2.default.cyan("\u250C Create a new project"));
223
- const projectNameResult = await text({
224
- message: "New project name (Enter to skip with default name)",
225
- placeholder: myProjectName
226
- });
227
- const projectName = (String(projectNameResult) || myProjectName).trim();
228
- const templateIndex = await select({
229
- message: "Select a template (Enter to select)",
230
- options: TEMPLATES.map((t, i) => ({
231
- value: i + "",
232
- label: `${t.name} (${t.desc})`
233
- }))
234
- });
235
- const template = TEMPLATES[Number(templateIndex)];
236
- const packageManagerIndex = await select({
237
- message: "Select a package manager (Enter to select)",
238
- options: PACKAGE_MANAGERS.map((pm, i) => ({
239
- value: i.toString(),
240
- label: pm
241
- }))
242
- });
243
- const packageManager = PACKAGE_MANAGERS[Number(packageManagerIndex)];
244
- console.log(import_picocolors2.default.cyan("\nTemplate created successfully!\n"));
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
+ );
245
422
  const s = spinner2();
246
423
  try {
247
424
  s.start(
@@ -257,83 +434,132 @@ async function init(myProjectName = DEFAULT_NAME) {
257
434
  template.repo,
258
435
  projectName
259
436
  ],
260
- {
261
- stdio: "ignore"
262
- }
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`)}`
263
449
  );
264
- await execa2("rm", ["-rf", ".git"], { stdio: "ignore", cwd: projectName });
265
- s.stop();
266
- console.log(import_picocolors2.default.green("\u2705 Project initialized successfully!\n"));
267
- console.log(import_picocolors2.default.cyan("Next steps:"));
268
- console.log(import_picocolors2.default.cyan(` cd ${projectName}`));
269
- console.log(import_picocolors2.default.cyan(` ${packageManager} install`));
270
- console.log(import_picocolors2.default.cyan(` ${packageManager} run dev
271
- `));
272
450
  } catch (err) {
273
451
  s.stop();
274
- console.error(import_picocolors2.default.red("\u274C Failed to initialize project"), err);
452
+ console.error(import_picocolors3.default.red("\xD7 Failed to initialize project"), err);
275
453
  }
276
454
  }
277
455
 
278
456
  // commands/remove.ts
279
- var import_picocolors3 = __toESM(require_picocolors());
280
- import { spinner as spinner3 } from "@clack/prompts";
457
+ var import_picocolors4 = __toESM(require_picocolors());
458
+ import { spinner as spinner3, text as text3 } from "@clack/prompts";
281
459
  import { execa as execa3 } from "execa";
282
- async function remove(component) {
283
- const s = spinner3();
460
+ async function remove(component, options) {
461
+ if (options.list) {
462
+ await list({ installed: true }, true);
463
+ }
284
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
+ }
285
495
  try {
286
- const pkgName = component === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${component}`;
496
+ const pkgName = packageName === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${packageName}`;
287
497
  s.start(`Removing ${pkgName}...`);
288
498
  await execa3(pkgManager, ["remove", pkgName], { stdio: "inherit" });
289
499
  s.stop();
290
- console.log(import_picocolors3.default.green(`\u2705 ${pkgName} removed successfully!`));
500
+ console.log(import_picocolors4.default.green(`\u2714 ${pkgName} removed successfully!`));
291
501
  } catch (err) {
292
502
  s.stop();
293
- console.error(import_picocolors3.default.red(`\u274C Failed to remove component ${component}`), err);
503
+ console.error(
504
+ import_picocolors4.default.red(`\xD7 Failed to remove component ${packageName}`),
505
+ err
506
+ );
294
507
  }
295
508
  }
296
509
 
297
510
  // commands/upgrade.ts
298
- var import_picocolors4 = __toESM(require_picocolors());
511
+ var import_picocolors5 = __toESM(require_picocolors());
299
512
  import { spinner as spinner4 } from "@clack/prompts";
300
513
  import { execa as execa4 } from "execa";
301
- async function upgrade(component) {
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
+ }
302
524
  const s = spinner4();
303
525
  const pkgManager = getCurrentPackageManager();
304
526
  try {
305
- const pkgName = component === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${component}`;
306
- s.start(`Upgrading ${pkgName}...`);
307
- await execa4(pkgManager, ["upgrade", pkgName], { stdio: "inherit" });
308
- s.stop();
309
- console.log(import_picocolors4.default.green(`\u2705 ${pkgName} upgraded successfully!`));
310
- } catch (err) {
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
+ }
311
545
  s.stop();
312
- console.error(
313
- import_picocolors4.default.red(`\u274C Failed to upgrade component ${component}`),
314
- err
315
- );
316
- }
317
- }
318
-
319
- // commands/list.ts
320
- var import_picocolors5 = __toESM(require_picocolors());
321
- import fs2 from "fs";
322
- async function list() {
323
- try {
324
- const pkgJson = JSON.parse(fs2.readFileSync("package.json", "utf-8"));
325
- const deps = pkgJson.dependencies || {};
326
- const aristobyteDeps = Object.keys(deps).filter(
327
- (d) => d.startsWith("@aristobyte-ui/")
546
+ console.log(
547
+ import_picocolors5.default.green(
548
+ `\u2714 Upgrade complete${options.to ? ` \u2192 version ${options.to}` : ""}!`
549
+ )
328
550
  );
329
- console.log(import_picocolors5.default.blue("Installed AristoByteUI components:"));
330
- aristobyteDeps.forEach((dep) => console.log(import_picocolors5.default.green(dep)));
331
551
  } catch (err) {
332
- console.error(import_picocolors5.default.red("\u274C Failed to list components"), err);
552
+ s.stop();
553
+ console.error(import_picocolors5.default.red(`\xD7 Upgrade failed.`));
554
+ console.error(import_picocolors5.default.dim(String(err)));
333
555
  }
334
556
  }
335
557
 
336
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";
337
563
  import { execSync } from "child_process";
338
564
  import { spinner as spinner5 } from "@clack/prompts";
339
565
 
@@ -348,102 +574,280 @@ function compareVersions(v1, v2) {
348
574
  return 0;
349
575
  }
350
576
 
351
- // commands/doctor.ts
577
+ // utils/checkVersion.ts
352
578
  var import_picocolors6 = __toESM(require_picocolors());
353
- var MIN_NODE_VERSION = "20.19.0";
354
- async function doctor() {
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) {
355
631
  const s = spinner5();
356
632
  try {
357
- s.start("Running project health checks...");
358
- let nodeVersion = "unknown";
359
- try {
360
- nodeVersion = execSync("node -v").toString().trim();
361
- } catch (err) {
362
- console.error(import_picocolors6.default.red("\u274C Failed to detect Node version:"), err);
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();
363
652
  }
364
- let nodeStatus = "\u2705 OK";
365
- if (nodeVersion !== "unknown" && compareVersions(nodeVersion, MIN_NODE_VERSION) < 0) {
366
- nodeStatus = import_picocolors6.default.red(`\u274C Node >= ${MIN_NODE_VERSION} required`);
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
+ );
367
668
  }
368
- let pkgManagerVersion = "unknown";
369
- const pkgManager = getCurrentPackageManager();
370
- try {
371
- pkgManagerVersion = execSync(`${pkgManager} -v`).toString().trim();
372
- } catch (err) {
373
- console.error(
374
- import_picocolors6.default.red(`\u274C Failed to detect ${pkgManager} version:`),
375
- err
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)}`
376
677
  );
377
678
  }
378
- s.stop();
379
- console.log(import_picocolors6.default.green(`Node version: ${nodeVersion} ${nodeStatus}`));
380
- console.log(import_picocolors6.default.green(`${pkgManager} version: ${pkgManagerVersion}`));
381
- console.log(import_picocolors6.default.green("All basic health checks completed!"));
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!"));
382
721
  } catch (err) {
383
- s.stop();
384
- console.error(import_picocolors6.default.red("\u274C Doctor check failed"), err);
722
+ s.stop(import_picocolors7.default.red("\xD7 Doctor diagnostics failed"));
723
+ console.error(import_picocolors7.default.red("\xD7 Diagnostics crashed"), err);
385
724
  }
386
725
  }
387
726
 
388
727
  // commands/env.ts
389
- import os from "os";
728
+ import os2 from "os";
729
+ import fs4 from "fs";
390
730
  import { execSync as execSync2 } from "child_process";
391
731
  import { spinner as spinner6 } from "@clack/prompts";
392
-
393
- // utils/checkVersion.ts
394
- var import_picocolors7 = __toESM(require_picocolors());
395
- function checkVersion(name, version, minVersion) {
396
- if (version === "unknown" || compareVersions(version, minVersion) < 0) {
397
- return import_picocolors7.default.red(`\u274C ${name} >= ${minVersion} required`);
398
- }
399
- return import_picocolors7.default.green(`\u2705 ${version}`);
400
- }
401
-
402
- // commands/env.ts
403
732
  var import_picocolors8 = __toESM(require_picocolors());
404
- var MIN_VERSIONS = {
405
- node: "20.17.0",
733
+ var MIN_VERSIONS2 = {
734
+ node: "20.19.0",
406
735
  pnpm: "10.15.1",
407
736
  npm: "10.8.2",
408
737
  yarn: "1.22.22",
409
738
  bun: "1.2.21"
410
739
  };
411
- function getVersion(command, name) {
740
+ function getVersion2(command, name) {
412
741
  try {
413
742
  return execSync2(command).toString().trim();
414
743
  } catch (err) {
415
- console.error(import_picocolors8.default.red(`\u274C Failed to detect ${name} version:`), err);
744
+ console.error(import_picocolors8.default.red(`\xD7 Failed to detect ${name} version:`), err);
416
745
  return "unknown";
417
746
  }
418
747
  }
419
- async function env() {
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) {
420
782
  const s = spinner6();
421
783
  try {
422
- s.start("Fetching system environment info...");
423
- const pkgManage = getCurrentPackageManager();
424
- const nodeVersion = getVersion("node -v", "Node");
425
- const pkgManagerVersion = getVersion(`${pkgManage} -v`, pkgManage);
426
- s.stop();
427
- console.log(import_picocolors8.default.blue("System Environment Info:"));
784
+ s.start("Collecting environment diagnostics\u2026");
428
785
  console.log(
429
- import_picocolors8.default.green(`OS: ${os.type()} ${os.release()} (${os.platform()})`)
430
- );
431
- console.log(import_picocolors8.default.green(`CPU: ${os.cpus()[0].model}`));
432
- console.log(
433
- import_picocolors8.default.green(`Memory: ${(os.totalmem() / 1024 / 1024).toFixed(0)} MB`)
434
- );
435
- console.log(
436
- `Node: ${checkVersion("Node", nodeVersion, MIN_VERSIONS.node)}`
437
- );
438
- console.log(
439
- `${pkgManagerVersion}: ${checkVersion(pkgManagerVersion, pkgManagerVersion, MIN_VERSIONS[pkgManagerVersion])}`
786
+ `${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Environment Diagnostics")}
787
+ ${import_picocolors8.default.gray("|")}`
440
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!"));
441
848
  } catch (err) {
442
- s.stop();
443
- console.error(
444
- import_picocolors8.default.red("\u274C Failed to fetch system environment info:"),
445
- err
446
- );
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);
447
851
  }
448
852
  }
449
853
 
@@ -451,28 +855,28 @@ async function env() {
451
855
  import chalk from "chalk";
452
856
  import gradient from "gradient-string";
453
857
  var LOGO_COLORS = ["#ffee27", "#fec800", "#f18e35", "#e95f32", "#e2312d"];
454
- function logo3(text2) {
455
- return chalk.hex(LOGO_COLORS[2])(text2);
858
+ function logo3(text4) {
859
+ return chalk.hex(LOGO_COLORS[2])(text4);
456
860
  }
457
- function logo4(text2) {
458
- return chalk.hex(LOGO_COLORS[3])(text2);
861
+ function logo4(text4) {
862
+ return chalk.hex(LOGO_COLORS[3])(text4);
459
863
  }
460
- function lightGrey(text2) {
461
- return chalk.hex("#afbfff")(text2);
864
+ function lightGrey(text4) {
865
+ return chalk.hex("#afbfff")(text4);
462
866
  }
463
- function darkGrey(text2) {
464
- return chalk.hex("#7580aa")(text2);
867
+ function darkGrey(text4) {
868
+ return chalk.hex("#7580aa")(text4);
465
869
  }
466
- function logoGradient(text2) {
870
+ function logoGradient(text4) {
467
871
  return gradient([
468
872
  ...LOGO_COLORS,
469
873
  ...LOGO_COLORS.reverse(),
470
874
  ...LOGO_COLORS,
471
875
  ...LOGO_COLORS.reverse(),
472
876
  ...LOGO_COLORS
473
- ]).multiline(text2);
877
+ ]).multiline(text4);
474
878
  }
475
- function logoSmallGradient(text2) {
879
+ function logoSmallGradient(text4) {
476
880
  return gradient([
477
881
  LOGO_COLORS[0],
478
882
  LOGO_COLORS[1],
@@ -480,84 +884,187 @@ function logoSmallGradient(text2) {
480
884
  LOGO_COLORS[0],
481
885
  LOGO_COLORS[0],
482
886
  LOGO_COLORS[1]
483
- ]).multiline(text2);
484
- }
485
-
486
- // utils/getBanner.ts
487
- var banners = [
488
- ` \u2591\u2588\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588
489
- \u2591\u2588\u2588\u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588
490
- \u2591\u2588\u2588 \u2591\u2588\u2588\u2591\u2588\u2588\u2591\u2588\u2588\u2588\u2591\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588 \u2591\u2588\u2588\u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588
491
- \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588 \u2591\u2588\u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588
492
- \u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588 \u2591\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588
493
- \u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588 \u2591\u2588\u2588
494
- \u2591\u2588\u2588 \u2591\u2588\u2591\u2588\u2588 \u2591\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588
495
- \u2591\u2588\u2588
496
- \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 `,
497
- ` \u2597\u2584\u2596\u2597\u2584\u2584\u2596\u2597\u2584\u2584\u2584\u2596\u2597\u2584\u2584\u2597\u2584\u2584\u2584\u2597\u2584\u2596\u2597\u2584\u2584\u2597\u2596 \u2597\u2597\u2584\u2584\u2584\u2597\u2584\u2584\u2584\u2596 \u2597\u2596 \u2597\u2597\u2584\u2584\u2584\u2596
498
- \u2590\u258C \u2590\u2590\u258C \u2590\u258C \u2588 \u2590\u258C \u2588\u2590\u258C \u2590\u2590\u258C \u2590\u259D\u259A\u259E\u2598 \u2588 \u2590\u258C \u2590\u258C \u2590\u258C \u2588
499
- \u2590\u259B\u2580\u259C\u2590\u259B\u2580\u259A\u2596 \u2588 \u259D\u2580\u259A\u2596 \u2588\u2590\u258C \u2590\u2590\u259B\u2580\u259A\u2596\u2590\u258C \u2588 \u2590\u259B\u2580\u2580\u2598 \u2590\u258C \u2590\u258C \u2588
500
- \u2590\u258C \u2590\u2590\u258C \u2590\u2597\u2584\u2588\u2584\u2597\u2584\u2584\u259E\u2598 \u2588\u259D\u259A\u2584\u259E\u2590\u2599\u2584\u259E\u2598\u2590\u258C \u2588 \u2590\u2599\u2584\u2584\u2596 \u259D\u259A\u2584\u259E\u2597\u2584\u2588\u2584\u2596`,
501
- ` _ _ _ ___ _ _ _ ___
502
- /_\\ _ _(_)__| |_ ___| _ )_ _| |_ ___ | | | |_ _|
503
- / _ \\| '_| (_-< _/ _ \\ _ \\ || | _/ -_) | |_| || |
504
- /_/ \\_\\_| |_/__/\\__\\___/___/\\_, |\\__\\___| \\___/|___|
505
- |__/ `,
506
- ` _____ _____
507
- ( ___ ) ( ___ )
508
- | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| |
509
- | | \\ _) | __ ) | | | _ _| | |
510
- | | _ \\ __| | __| __| _ \\ __ \\ | | __| _ \\ | | | | |
511
- | | ___ \\ | | \\__ \\ | ( | | | | | | __/ | | | | |
512
- | | _/ _\\ _| _| ____/ \\__| \\___/ ____/ \\__, | \\__| \\___| \\___/ ___| | |
513
- | | ____/ | |
514
- |___|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|___|
515
- (_____) (_____)`,
516
- ` \\ _) | __ ) | | | _ _|
517
- _ \\ __| | __| __| _ \\ __ \\ | | __| _ \\ | | |
518
- ___ \\ | | \\__ \\ | ( | | | | | | __/ | | |
519
- _/ _\\ _| _| ____/ \\__| \\___/ ____/ \\__, | \\__| \\___| \\___/ ___|
520
- ____/ `,
521
- ` ___ _ __ ____ __ __ ______
522
- / | _____(______/ /_____ / __ )__ __/ /____ / / / / _/
523
- / /| | / ___/ / ___/ __/ __ \\/ __ / / / / __/ _ \\ / / / // /
524
- / ___ |/ / / (__ / /_/ /_/ / /_/ / /_/ / /_/ __/ / /_/ _/ /
525
- /_/ |_/_/ /_/____/\\__/\\____/_____/\\__, /\\__/\\___/ \\____/___/
526
- /____/ `,
527
- ` \u2588\u2588
528
- \u2592\u2588\u2588\u2592 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2592 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
529
- \u2593\u2588\u2588\u2593 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
530
- \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2592\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
531
- \u2588\u2588\u2588\u2588 \u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2592\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2591\u2588\u2588 \u2588\u2588\u2588\u2593 \u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2592 \u2588\u2588 \u2588\u2588 \u2588\u2588
532
- \u2592\u2588\u2593\u2593\u2588\u2592\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\u2588\u2588\u2588\u2588\u2588 \u2592\u2588\u2592\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2592 \u2588\u2588 \u2588\u2588 \u2588\u2588
533
- \u2593\u2588\u2592\u2592\u2588\u2593\u2588\u2588\u2588\u2591 \u2588\u2588 \u2588\u2588\u2592 \u2591\u2592\u2588 \u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2592 \u2588\u2588\u2591 \u2588\u2588 \u2588\u2588\u2592 \u2592\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
534
- \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2593\u2591 \u2588\u2588 \u2588\u2588\u2591 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2592\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
535
- \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2592 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588 \u2592\u2588\u2588\u2591\u2588\u2588\u2593\u2588\u2593 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
536
- \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2591\u2592\u2593\u2588\u2588 \u2588\u2588 \u2588\u2588\u2591 \u2591\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2591 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
537
- \u2592\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2592\u2591 \u2592\u2588\u2588 \u2588\u2588\u2591 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2592\u2588\u2588 \u2592\u2588\u2588\u2588 \u2588\u2588\u2591 \u2588\u2588\u2588\u2591 \u2592\u2588 \u2588\u2588\u2593 \u2593\u2588\u2588 \u2588\u2588
538
- \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\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2592\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588
539
- \u2588\u2588\u2592 \u2592\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2593\u2588\u2588\u2588\u2588\u2593 \u2591\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2593 \u2588\u2588\u2591 \u2591\u2588\u2588\u2588\u2588\u2591\u2588\u2588\u2588\u2588\u2588\u2592 \u2592\u2588\u2588\u2588\u2588\u2592\u2588\u2588\u2588\u2588\u2588\u2588
540
- \u2592\u2588\u2588
541
- \u2588\u2588\u2588\u2592
542
- \u2588\u2588\u2588 `
543
- ];
544
- function getBanner() {
545
- return logoGradient(banners[0]);
887
+ ]).multiline(text4);
546
888
  }
547
889
 
548
890
  // utils/typography.ts
549
891
  function usage(params) {
550
892
  return params.map((param) => `${logo4("[")} ${lightGrey(param)} ${logo4("]")}`).join(" ");
551
893
  }
552
- function description(text2) {
553
- return darkGrey(`- ${text2}`);
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
+ `;
554
1061
  }
555
1062
 
556
1063
  // package.json
557
1064
  var package_default = {
558
1065
  name: "@aristobyte-ui/cli",
559
1066
  description: "The official AristoByteUI CLI \u2014 initialize projects, install, upgrade, remove, and manage UI components seamlessly.",
560
- version: "1.0.110",
1067
+ version: "1.0.112",
561
1068
  license: "MIT",
562
1069
  private: false,
563
1070
  author: "AristoByte <info@aristobyte.com>",
@@ -613,8 +1120,8 @@ var package_default = {
613
1120
  "check-types": "tsc --noEmit"
614
1121
  },
615
1122
  dependencies: {
616
- "@aristobyte-ui/eslint-config": "^1.0.110",
617
- "@aristobyte-ui/typescript-config": "^1.0.110",
1123
+ "@aristobyte-ui/eslint-config": "^1.0.112",
1124
+ "@aristobyte-ui/typescript-config": "^1.0.112",
618
1125
  "@clack/prompts": "^0.11.0",
619
1126
  axios: "^1.6.0",
620
1127
  chalk: "^5.6.1",
@@ -645,49 +1152,46 @@ var COMMANDS = [
645
1152
  "help"
646
1153
  ];
647
1154
  var aristobyteui = new Command();
648
- aristobyteui.name("aristobyte-ui").usage(usage(["command", "options"])).description("Initialize a new AristoByteUI project").version(package_default.version, "-V, --version", "Output the CLI version").helpOption("-H, --help", "Show help information");
649
- aristobyteui.command("init").usage(usage(["options", "myProjectName"])).description("Initialize a new AristoByteUI project").action((myProjectName) => {
650
- init(myProjectName);
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)
651
1159
  });
652
- aristobyteui.command("add").usage(usage(["options", "components..."])).description("Add a UI component").action(add);
653
- aristobyteui.command("remove").usage(usage(["options", "components..."])).description("Remove a UI component").action(remove);
654
- aristobyteui.command("upgrade").usage(usage(["options", "components..."])).description("Upgrade a UI component").action(upgrade);
655
- aristobyteui.command("list").usage(usage(["options"])).description("List installed components").action(list);
656
- aristobyteui.command("doctor").usage(usage(["options"])).description("Check system and project health").action(doctor);
657
- aristobyteui.command("env").usage(usage(["options"])).description("Display environment info").action(env);
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);
658
1193
  aristobyteui.command("help").usage(usage(["options"])).description("Display help for command").action(env);
659
1194
  aristobyteui.command("help", { hidden: true });
660
- aristobyteui.configureHelp({
661
- formatHelp: (cmd, helper) => `
662
- ${getBanner()}
663
- ${logoSmallGradient("Usage:")}
664
- ${logo3(helper.commandUsage(cmd))}
665
-
666
- ${logoSmallGradient("Description:")}
667
- ${darkGrey(
668
- "Create new AristoByteUI projects or manage existing projects with full control"
669
- )}
670
- ${darkGrey("over components, dependencies, and UI stack configuration. Supports initialization,")}
671
- ${darkGrey(
672
- "addition, removal, upgrading of components, and project diagnostics."
673
- )}
674
-
675
- ${logoSmallGradient("Commands:")}
676
- ${helper.visibleCommands(cmd).map(
677
- (c) => ` ${`${logo3(c.name()).padEnd(31)} ${c.usage() || "".padEnd(30)}`.padEnd(129)} ${description(c.description())}`
678
- ).join("\n")}
679
-
680
- ${logoSmallGradient("Options:")}
681
- ${helper.visibleOptions(cmd).map((option) => {
682
- const flagsArray = option.flags.split(/,\s*/);
683
- const styledFlags = `${logo3(flagsArray[0])}${darkGrey(", ")}${logo4(flagsArray[1])}`;
684
- return ` ${styledFlags.padEnd(93)} ${description(option.description)}`;
685
- }).join("\n")}
686
-
687
- ${logoSmallGradient("Tip:")}
688
- ${lightGrey("Use 'aristobyte-ui [ command ] --help' for detailed info on a command.")}
689
- `
690
- });
691
1195
  aristobyteui.exitOverride(async (err) => {
692
1196
  if (err.code === "commander.unknownCommand") {
693
1197
  console.error(
@@ -709,8 +1213,8 @@ aristobyteui.exitOverride(async (err) => {
709
1213
  }
710
1214
  try {
711
1215
  await aristobyteui.parseAsync(args, { from: "user" });
712
- process.exit(1);
713
- } catch {
1216
+ } catch (err) {
1217
+ console.error(darkGrey("Error:"), lightGrey(err.message));
714
1218
  process.exit(1);
715
1219
  }
716
1220
  })();