@aristobyte-ui/cli 1.0.109 → 1.0.111

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,35 +151,161 @@ async function installPackage(pkgManager, pkg, dev = false) {
130
151
  await execa(pkgManager, args, { stdio: "inherit" });
131
152
  }
132
153
 
133
- // commands/add.ts
154
+ // commands/list.ts
134
155
  var import_picocolors = __toESM(require_picocolors());
135
- async function add(component) {
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
+ }
136
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
+ }
137
286
  try {
138
- s.start(`Installing ${component}...`);
139
- if (component === "all") {
140
- await installPackage("yarn", "@aristobyte-ui/react");
287
+ s.start(`Installing ${packageName}...`);
288
+ const pkgManager2 = getCurrentPackageManager();
289
+ if (packageName === "all") {
290
+ await installPackage(pkgManager2, "@aristobyte-ui/react");
141
291
  s.stop();
142
- console.log(import_picocolors.default.green("\u2705 All components installed!"));
292
+ console.log(import_picocolors2.default.green("\u2714 All components installed!"));
143
293
  return;
144
294
  }
145
- const pkgName = `@aristobyte-ui/${component}`;
146
- await installPackage("yarn", pkgName);
295
+ const pkgName = `@aristobyte-ui/${packageName}`;
296
+ await installPackage(pkgManager2, pkgName);
147
297
  s.stop();
148
- console.log(import_picocolors.default.green(`\u2705 Component ${component} installed!`));
298
+ console.log(import_picocolors2.default.green(`\u2714 Component ${packageName} installed!`));
149
299
  } catch (err) {
150
300
  s.stop();
151
- console.error(
152
- import_picocolors.default.red(`\u274C Failed to install component ${component}`),
153
- err
154
- );
301
+ console.error(import_picocolors2.default.red(`\xD7 Failed to install package ${packageName}`), err);
155
302
  }
156
303
  }
157
304
 
158
305
  // commands/init.ts
159
- var import_picocolors2 = __toESM(require_picocolors());
306
+ var import_picocolors3 = __toESM(require_picocolors());
160
307
  import { execa as execa2 } from "execa";
161
- import { select, text, spinner as spinner2 } from "@clack/prompts";
308
+ import { select, text as text2, spinner as spinner2 } from "@clack/prompts";
162
309
  var TEMPLATES = [
163
310
  {
164
311
  id: "aristobyte-ui-template-nextjs-15-app-router",
@@ -178,6 +325,12 @@ var TEMPLATES = [
178
325
  desc: "A Vite template pre-configured with AristoByteUI.",
179
326
  repo: "https://github.com/aristobyte-team/aristobyte-ui-template-vite.git"
180
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
+ },
181
334
  {
182
335
  id: "aristobyte-ui-template-astro",
183
336
  name: "Astro",
@@ -185,38 +338,87 @@ var TEMPLATES = [
185
338
  repo: "https://github.com/aristobyte-team/aristobyte-ui-template-astro.git"
186
339
  },
187
340
  {
188
- id: "aristobyte-ui-template-cra",
189
- name: "CRA",
190
- desc: "A Create React App template pre-configured with AristoByteUI.",
191
- repo: "https://github.com/aristobyte-team/aristobyte-ui-template-cra.git"
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"
192
345
  }
193
346
  ];
194
347
  var PACKAGE_MANAGERS = ["npm", "yarn", "pnpm", "bun"];
195
348
  var DEFAULT_NAME = "aristobyte-ui-app";
196
- async function init(myProjectName = DEFAULT_NAME) {
197
- console.log(import_picocolors2.default.cyan("\u250C Create a new project"));
198
- const projectNameResult = await text({
199
- message: "New project name (Enter to skip with default name)",
200
- placeholder: myProjectName
201
- });
202
- const projectName = (String(projectNameResult) || myProjectName).trim();
203
- const templateIndex = await select({
204
- message: "Select a template (Enter to select)",
205
- options: TEMPLATES.map((t, i) => ({
206
- value: i + "",
207
- label: `${t.name} (${t.desc})`
208
- }))
209
- });
210
- const template = TEMPLATES[Number(templateIndex)];
211
- const packageManagerIndex = await select({
212
- message: "Select a package manager (Enter to select)",
213
- options: PACKAGE_MANAGERS.map((pm, i) => ({
214
- value: i.toString(),
215
- label: pm
216
- }))
217
- });
218
- const packageManager = PACKAGE_MANAGERS[Number(packageManagerIndex)];
219
- 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
+ );
220
422
  const s = spinner2();
221
423
  try {
222
424
  s.start(
@@ -232,81 +434,132 @@ async function init(myProjectName = DEFAULT_NAME) {
232
434
  template.repo,
233
435
  projectName
234
436
  ],
235
- {
236
- stdio: "ignore"
237
- }
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`)}`
238
449
  );
239
- await execa2("rm", ["-rf", ".git"], { stdio: "ignore", cwd: projectName });
240
- s.stop();
241
- console.log(import_picocolors2.default.green("\u2705 Project initialized successfully!\n"));
242
- console.log(import_picocolors2.default.cyan("Next steps:"));
243
- console.log(import_picocolors2.default.cyan(` cd ${projectName}`));
244
- console.log(import_picocolors2.default.cyan(` ${packageManager} install`));
245
- console.log(import_picocolors2.default.cyan(` ${packageManager} run dev
246
- `));
247
450
  } catch (err) {
248
451
  s.stop();
249
- 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);
250
453
  }
251
454
  }
252
455
 
253
456
  // commands/remove.ts
254
- var import_picocolors3 = __toESM(require_picocolors());
255
- 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";
256
459
  import { execa as execa3 } from "execa";
257
- async function remove(component) {
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
+ }
258
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
+ }
259
495
  try {
260
- const pkgName = component === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${component}`;
496
+ const pkgName = packageName === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${packageName}`;
261
497
  s.start(`Removing ${pkgName}...`);
262
- await execa3("yarn", ["remove", pkgName], { stdio: "inherit" });
498
+ await execa3(pkgManager, ["remove", pkgName], { stdio: "inherit" });
263
499
  s.stop();
264
- console.log(import_picocolors3.default.green(`\u2705 ${pkgName} removed successfully!`));
500
+ console.log(import_picocolors4.default.green(`\u2714 ${pkgName} removed successfully!`));
265
501
  } catch (err) {
266
502
  s.stop();
267
- 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
+ );
268
507
  }
269
508
  }
270
509
 
271
510
  // commands/upgrade.ts
272
- var import_picocolors4 = __toESM(require_picocolors());
511
+ var import_picocolors5 = __toESM(require_picocolors());
273
512
  import { spinner as spinner4 } from "@clack/prompts";
274
513
  import { execa as execa4 } from "execa";
275
- async function upgrade(component) {
276
- const s = spinner4();
277
- try {
278
- const pkgName = component === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${component}`;
279
- s.start(`Upgrading ${pkgName}...`);
280
- await execa4("yarn", ["upgrade", pkgName], { stdio: "inherit" });
281
- s.stop();
282
- console.log(import_picocolors4.default.green(`\u2705 ${pkgName} upgraded successfully!`));
283
- } catch (err) {
284
- s.stop();
285
- console.error(
286
- import_picocolors4.default.red(`\u274C Failed to upgrade component ${component}`),
287
- err
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
+ )
288
521
  );
522
+ process.exit(0);
289
523
  }
290
- }
291
-
292
- // commands/list.ts
293
- var import_picocolors5 = __toESM(require_picocolors());
294
- import fs from "fs";
295
- async function list() {
524
+ const s = spinner4();
525
+ const pkgManager = getCurrentPackageManager();
296
526
  try {
297
- const pkgJson = JSON.parse(fs.readFileSync("package.json", "utf-8"));
298
- const deps = pkgJson.dependencies || {};
299
- const aristobyteDeps = Object.keys(deps).filter(
300
- (d) => d.startsWith("@aristobyte-ui/")
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
+ )
301
550
  );
302
- console.log(import_picocolors5.default.blue("Installed AristoByteUI components:"));
303
- aristobyteDeps.forEach((dep) => console.log(import_picocolors5.default.green(dep)));
304
551
  } catch (err) {
305
- 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)));
306
555
  }
307
556
  }
308
557
 
309
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";
310
563
  import { execSync } from "child_process";
311
564
  import { spinner as spinner5 } from "@clack/prompts";
312
565
 
@@ -321,97 +574,280 @@ function compareVersions(v1, v2) {
321
574
  return 0;
322
575
  }
323
576
 
324
- // commands/doctor.ts
577
+ // utils/checkVersion.ts
325
578
  var import_picocolors6 = __toESM(require_picocolors());
326
- var MIN_NODE_VERSION = "20.19.0";
327
- 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) {
328
631
  const s = spinner5();
329
632
  try {
330
- s.start("Running project health checks...");
331
- let nodeVersion = "unknown";
332
- try {
333
- nodeVersion = execSync("node -v").toString().trim();
334
- } catch (err) {
335
- 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();
336
652
  }
337
- let nodeStatus = "\u2705 OK";
338
- if (nodeVersion !== "unknown" && compareVersions(nodeVersion, MIN_NODE_VERSION) < 0) {
339
- 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
+ );
340
668
  }
341
- let yarnVersion = "unknown";
342
- try {
343
- yarnVersion = execSync("yarn -v").toString().trim();
344
- } catch (err) {
345
- console.error(import_picocolors6.default.red("\u274C Failed to detect Yarn version:"), 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)}`
677
+ );
346
678
  }
347
- s.stop();
348
- console.log(import_picocolors6.default.green(`Node version: ${nodeVersion} ${nodeStatus}`));
349
- console.log(import_picocolors6.default.green(`Yarn version: ${yarnVersion}`));
350
- 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!"));
351
721
  } catch (err) {
352
- s.stop();
353
- 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);
354
724
  }
355
725
  }
356
726
 
357
727
  // commands/env.ts
358
- import os from "os";
728
+ import os2 from "os";
729
+ import fs4 from "fs";
359
730
  import { execSync as execSync2 } from "child_process";
360
731
  import { spinner as spinner6 } from "@clack/prompts";
361
-
362
- // utils/checkVersion.ts
363
- var import_picocolors7 = __toESM(require_picocolors());
364
- function checkVersion(name, version, minVersion) {
365
- if (version === "unknown" || compareVersions(version, minVersion) < 0) {
366
- return import_picocolors7.default.red(`\u274C ${name} >= ${minVersion} required`);
367
- }
368
- return import_picocolors7.default.green(`\u2705 ${version}`);
369
- }
370
-
371
- // commands/env.ts
372
732
  var import_picocolors8 = __toESM(require_picocolors());
373
- var MIN_VERSIONS = {
374
- node: "20.17.0",
733
+ var MIN_VERSIONS2 = {
734
+ node: "20.19.0",
735
+ pnpm: "10.15.1",
375
736
  npm: "10.8.2",
376
- yarn: "1.22.22"
737
+ yarn: "1.22.22",
738
+ bun: "1.2.21"
377
739
  };
378
- function getVersion(command, name) {
740
+ function getVersion2(command, name) {
379
741
  try {
380
742
  return execSync2(command).toString().trim();
381
743
  } catch (err) {
382
- 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);
383
745
  return "unknown";
384
746
  }
385
747
  }
386
- 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) {
387
782
  const s = spinner6();
388
783
  try {
389
- s.start("Fetching system environment info...");
390
- const nodeVersion = getVersion("node -v", "Node");
391
- const npmVersion = getVersion("npm -v", "npm");
392
- const yarnVersion = getVersion("yarn -v", "Yarn");
393
- s.stop();
394
- console.log(import_picocolors8.default.blue("System Environment Info:"));
784
+ s.start("Collecting environment diagnostics\u2026");
395
785
  console.log(
396
- import_picocolors8.default.green(`OS: ${os.type()} ${os.release()} (${os.platform()})`)
397
- );
398
- console.log(import_picocolors8.default.green(`CPU: ${os.cpus()[0].model}`));
399
- console.log(
400
- import_picocolors8.default.green(`Memory: ${(os.totalmem() / 1024 / 1024).toFixed(0)} MB`)
401
- );
402
- console.log(
403
- `Node: ${checkVersion("Node", nodeVersion, MIN_VERSIONS.node)}`
404
- );
405
- console.log(`npm: ${checkVersion("npm", npmVersion, MIN_VERSIONS.npm)}`);
406
- console.log(
407
- `Yarn: ${checkVersion("Yarn", yarnVersion, MIN_VERSIONS.yarn)}`
786
+ `${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Environment Diagnostics")}
787
+ ${import_picocolors8.default.gray("|")}`
408
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!"));
409
848
  } catch (err) {
410
- s.stop();
411
- console.error(
412
- import_picocolors8.default.red("\u274C Failed to fetch system environment info:"),
413
- err
414
- );
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);
415
851
  }
416
852
  }
417
853
 
@@ -419,28 +855,28 @@ async function env() {
419
855
  import chalk from "chalk";
420
856
  import gradient from "gradient-string";
421
857
  var LOGO_COLORS = ["#ffee27", "#fec800", "#f18e35", "#e95f32", "#e2312d"];
422
- function logo3(text2) {
423
- return chalk.hex(LOGO_COLORS[2])(text2);
858
+ function logo3(text4) {
859
+ return chalk.hex(LOGO_COLORS[2])(text4);
424
860
  }
425
- function logo4(text2) {
426
- return chalk.hex(LOGO_COLORS[3])(text2);
861
+ function logo4(text4) {
862
+ return chalk.hex(LOGO_COLORS[3])(text4);
427
863
  }
428
- function lightGrey(text2) {
429
- return chalk.hex("#afbfff")(text2);
864
+ function lightGrey(text4) {
865
+ return chalk.hex("#afbfff")(text4);
430
866
  }
431
- function darkGrey(text2) {
432
- return chalk.hex("#7580aa")(text2);
867
+ function darkGrey(text4) {
868
+ return chalk.hex("#7580aa")(text4);
433
869
  }
434
- function logoGradient(text2) {
870
+ function logoGradient(text4) {
435
871
  return gradient([
436
872
  ...LOGO_COLORS,
437
873
  ...LOGO_COLORS.reverse(),
438
874
  ...LOGO_COLORS,
439
875
  ...LOGO_COLORS.reverse(),
440
876
  ...LOGO_COLORS
441
- ]).multiline(text2);
877
+ ]).multiline(text4);
442
878
  }
443
- function logoSmallGradient(text2) {
879
+ function logoSmallGradient(text4) {
444
880
  return gradient([
445
881
  LOGO_COLORS[0],
446
882
  LOGO_COLORS[1],
@@ -448,84 +884,187 @@ function logoSmallGradient(text2) {
448
884
  LOGO_COLORS[0],
449
885
  LOGO_COLORS[0],
450
886
  LOGO_COLORS[1]
451
- ]).multiline(text2);
452
- }
453
-
454
- // utils/getBanner.ts
455
- var banners = [
456
- ` \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
457
- \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
458
- \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
459
- \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
460
- \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
461
- \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
462
- \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
463
- \u2591\u2588\u2588
464
- \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 `,
465
- ` \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
466
- \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
467
- \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
468
- \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`,
469
- ` _ _ _ ___ _ _ _ ___
470
- /_\\ _ _(_)__| |_ ___| _ )_ _| |_ ___ | | | |_ _|
471
- / _ \\| '_| (_-< _/ _ \\ _ \\ || | _/ -_) | |_| || |
472
- /_/ \\_\\_| |_/__/\\__\\___/___/\\_, |\\__\\___| \\___/|___|
473
- |__/ `,
474
- ` _____ _____
475
- ( ___ ) ( ___ )
476
- | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| |
477
- | | \\ _) | __ ) | | | _ _| | |
478
- | | _ \\ __| | __| __| _ \\ __ \\ | | __| _ \\ | | | | |
479
- | | ___ \\ | | \\__ \\ | ( | | | | | | __/ | | | | |
480
- | | _/ _\\ _| _| ____/ \\__| \\___/ ____/ \\__, | \\__| \\___| \\___/ ___| | |
481
- | | ____/ | |
482
- |___|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|___|
483
- (_____) (_____)`,
484
- ` \\ _) | __ ) | | | _ _|
485
- _ \\ __| | __| __| _ \\ __ \\ | | __| _ \\ | | |
486
- ___ \\ | | \\__ \\ | ( | | | | | | __/ | | |
487
- _/ _\\ _| _| ____/ \\__| \\___/ ____/ \\__, | \\__| \\___| \\___/ ___|
488
- ____/ `,
489
- ` ___ _ __ ____ __ __ ______
490
- / | _____(______/ /_____ / __ )__ __/ /____ / / / / _/
491
- / /| | / ___/ / ___/ __/ __ \\/ __ / / / / __/ _ \\ / / / // /
492
- / ___ |/ / / (__ / /_/ /_/ / /_/ / /_/ / /_/ __/ / /_/ _/ /
493
- /_/ |_/_/ /_/____/\\__/\\____/_____/\\__, /\\__/\\___/ \\____/___/
494
- /____/ `,
495
- ` \u2588\u2588
496
- \u2592\u2588\u2588\u2592 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2592 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
497
- \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
498
- \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2592\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
499
- \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
500
- \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
501
- \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
502
- \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
503
- \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
504
- \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
505
- \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
506
- \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
507
- \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
508
- \u2592\u2588\u2588
509
- \u2588\u2588\u2588\u2592
510
- \u2588\u2588\u2588 `
511
- ];
512
- function getBanner() {
513
- return logoGradient(banners[0]);
887
+ ]).multiline(text4);
514
888
  }
515
889
 
516
890
  // utils/typography.ts
517
891
  function usage(params) {
518
892
  return params.map((param) => `${logo4("[")} ${lightGrey(param)} ${logo4("]")}`).join(" ");
519
893
  }
520
- function description(text2) {
521
- 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
+ `;
522
1061
  }
523
1062
 
524
1063
  // package.json
525
1064
  var package_default = {
526
1065
  name: "@aristobyte-ui/cli",
527
1066
  description: "The official AristoByteUI CLI \u2014 initialize projects, install, upgrade, remove, and manage UI components seamlessly.",
528
- version: "1.0.109",
1067
+ version: "1.0.111",
529
1068
  license: "MIT",
530
1069
  private: false,
531
1070
  author: "AristoByte <info@aristobyte.com>",
@@ -581,8 +1120,8 @@ var package_default = {
581
1120
  "check-types": "tsc --noEmit"
582
1121
  },
583
1122
  dependencies: {
584
- "@aristobyte-ui/eslint-config": "^1.0.109",
585
- "@aristobyte-ui/typescript-config": "^1.0.109",
1123
+ "@aristobyte-ui/eslint-config": "^1.0.111",
1124
+ "@aristobyte-ui/typescript-config": "^1.0.111",
586
1125
  "@clack/prompts": "^0.11.0",
587
1126
  axios: "^1.6.0",
588
1127
  chalk: "^5.6.1",
@@ -613,49 +1152,46 @@ var COMMANDS = [
613
1152
  "help"
614
1153
  ];
615
1154
  var aristobyteui = new Command();
616
- 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");
617
- aristobyteui.command("init").usage(usage(["options", "myProjectName"])).description("Initialize a new AristoByteUI project").action((myProjectName) => {
618
- 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)
619
1159
  });
620
- aristobyteui.command("add").usage(usage(["options", "components..."])).description("Add a UI component").action(add);
621
- aristobyteui.command("remove").usage(usage(["options", "components..."])).description("Remove a UI component").action(remove);
622
- aristobyteui.command("upgrade").usage(usage(["options", "components..."])).description("Upgrade a UI component").action(upgrade);
623
- aristobyteui.command("list").usage(usage(["options"])).description("List installed components").action(list);
624
- aristobyteui.command("doctor").usage(usage(["options"])).description("Check system and project health").action(doctor);
625
- 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);
626
1193
  aristobyteui.command("help").usage(usage(["options"])).description("Display help for command").action(env);
627
1194
  aristobyteui.command("help", { hidden: true });
628
- aristobyteui.configureHelp({
629
- formatHelp: (cmd, helper) => `
630
- ${getBanner()}
631
- ${logoSmallGradient("Usage:")}
632
- ${logo3(helper.commandUsage(cmd))}
633
-
634
- ${logoSmallGradient("Description:")}
635
- ${darkGrey(
636
- "Create new AristoByteUI projects or manage existing projects with full control"
637
- )}
638
- ${darkGrey("over components, dependencies, and UI stack configuration. Supports initialization,")}
639
- ${darkGrey(
640
- "addition, removal, upgrading of components, and project diagnostics."
641
- )}
642
-
643
- ${logoSmallGradient("Commands:")}
644
- ${helper.visibleCommands(cmd).map(
645
- (c) => ` ${`${logo3(c.name()).padEnd(31)} ${c.usage() || "".padEnd(30)}`.padEnd(129)} ${description(c.description())}`
646
- ).join("\n")}
647
-
648
- ${logoSmallGradient("Options:")}
649
- ${helper.visibleOptions(cmd).map((option) => {
650
- const flagsArray = option.flags.split(/,\s*/);
651
- const styledFlags = `${logo3(flagsArray[0])}${darkGrey(", ")}${logo4(flagsArray[1])}`;
652
- return ` ${styledFlags.padEnd(93)} ${description(option.description)}`;
653
- }).join("\n")}
654
-
655
- ${logoSmallGradient("Tip:")}
656
- ${lightGrey("Use 'aristobyte-ui [ command ] --help' for detailed info on a command.")}
657
- `
658
- });
659
1195
  aristobyteui.exitOverride(async (err) => {
660
1196
  if (err.code === "commander.unknownCommand") {
661
1197
  console.error(
@@ -677,8 +1213,8 @@ aristobyteui.exitOverride(async (err) => {
677
1213
  }
678
1214
  try {
679
1215
  await aristobyteui.parseAsync(args, { from: "user" });
680
- process.exit(1);
681
- } catch {
1216
+ } catch (err) {
1217
+ console.error(darkGrey("Error:"), lightGrey(err.message));
682
1218
  process.exit(1);
683
1219
  }
684
1220
  })();