@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.js CHANGED
@@ -105,6 +105,27 @@ var import_commander = require("commander");
105
105
  // commands/add.ts
106
106
  var import_prompts = require("@clack/prompts");
107
107
 
108
+ // utils/getCurrentPackageManager.ts
109
+ var import_fs = __toESM(require("fs"));
110
+ var import_path = __toESM(require("path"));
111
+ function getCurrentPackageManager(cwd = process.cwd()) {
112
+ const lockFiles = {
113
+ bun: "bun.lockb",
114
+ pnpm: "pnpm-lock.yaml",
115
+ yarn: "yarn.lock",
116
+ npm: "package-lock.json"
117
+ };
118
+ for (const [manager, lockFile] of Object.entries(lockFiles)) {
119
+ if (import_fs.default.existsSync(import_path.default.join(cwd, lockFile))) {
120
+ return manager;
121
+ }
122
+ }
123
+ return "npm";
124
+ }
125
+
126
+ // commands/add.ts
127
+ var import_picocolors2 = __toESM(require_picocolors());
128
+
108
129
  // utils/installPackage.ts
109
130
  var import_execa = require("execa");
110
131
  async function installPackage(pkgManager, pkg, dev = false) {
@@ -131,35 +152,161 @@ async function installPackage(pkgManager, pkg, dev = false) {
131
152
  await (0, import_execa.execa)(pkgManager, args, { stdio: "inherit" });
132
153
  }
133
154
 
134
- // commands/add.ts
155
+ // commands/list.ts
156
+ var import_fs2 = __toESM(require("fs"));
135
157
  var import_picocolors = __toESM(require_picocolors());
136
- async function add(component) {
158
+ async function list(options, endBlock) {
159
+ let handled = false;
160
+ if (options.all) {
161
+ handled = true;
162
+ const url = "https://registry.npmjs.org/-/org/aristobyte-ui/package";
163
+ const omit = ["cli", "react"];
164
+ try {
165
+ const res = await fetch(url);
166
+ if (!res.ok) throw new Error(`Registry request failed: ${res.status}`);
167
+ const data = await res.json();
168
+ const packages = Object.keys(data).map((dep) => dep.split("/")[1]).filter((dep) => !omit.includes(dep)).sort();
169
+ console.log(
170
+ `${import_picocolors.default.green("\u25C7")} ${import_picocolors.default.white("Listing AristoByteUI packages:")}
171
+ ${packages.map((dep) => `${import_picocolors.default.gray("|")} ${import_picocolors.default.cyan(dep)}`).join("\n")}`
172
+ );
173
+ } catch (err) {
174
+ console.error(
175
+ import_picocolors.default.red("\xD7 Failed to fetch package list from npm registry")
176
+ );
177
+ console.error(import_picocolors.default.dim(String(err)));
178
+ }
179
+ if (endBlock) console.log(import_picocolors.default.green("\u25C7"));
180
+ process.exit(0);
181
+ }
182
+ if (options.installed) {
183
+ handled = true;
184
+ try {
185
+ const pkgJson = JSON.parse(import_fs2.default.readFileSync("package.json", "utf-8"));
186
+ const deps = pkgJson.dependencies || {};
187
+ const aristobyteDeps = Object.keys(deps).filter((d) => d.startsWith("@aristobyte-ui/")).map((dep) => dep.includes("react") ? "all" : dep.split("/")[1]);
188
+ console.log(
189
+ `${import_picocolors.default.green("\u25C7")} ${import_picocolors.default.white("Listing installed AristoByteUI packages:")}
190
+ ${aristobyteDeps.map((dep) => `${import_picocolors.default.gray("|")} ${import_picocolors.default.cyan(dep)}`).join("\n")}`
191
+ );
192
+ } catch (err) {
193
+ console.error(import_picocolors.default.red("\xD7 Failed to list packages"), err);
194
+ }
195
+ if (endBlock) console.log(import_picocolors.default.green("\u25C7"));
196
+ process.exit(0);
197
+ }
198
+ if (options.outdated) {
199
+ handled = true;
200
+ const packagesToUpdate = [];
201
+ try {
202
+ const pkgJson = JSON.parse(import_fs2.default.readFileSync("package.json", "utf-8"));
203
+ const deps = pkgJson.dependencies || {};
204
+ const installed = Object.keys(deps).filter(
205
+ (d) => d.startsWith("@aristobyte-ui/")
206
+ );
207
+ if (installed.length === 0) {
208
+ console.log(import_picocolors.default.yellow("No AristoByteUI packages installed."));
209
+ process.exit(0);
210
+ }
211
+ console.log(
212
+ `${import_picocolors.default.green("\u25C7")} ${import_picocolors.default.white("Checking for outdated AristoByteUI packages...")}`
213
+ );
214
+ for (const pkg of installed) {
215
+ const localVersion = deps[pkg].replace(/^[^\d]*/, "");
216
+ const registryUrl = `https://registry.npmjs.org/${pkg}`;
217
+ try {
218
+ const res = await fetch(registryUrl);
219
+ if (!res.ok)
220
+ throw new Error(`Registry request failed: ${res.status}`);
221
+ const data = await res.json();
222
+ const latest = data["dist-tags"]?.latest;
223
+ if (!latest) continue;
224
+ if (latest !== localVersion) {
225
+ const p = pkg.replace("@aristobyte-ui/", "");
226
+ packagesToUpdate.push([p, latest]);
227
+ console.log(
228
+ `${import_picocolors.default.gray("|")} ${import_picocolors.default.cyan(p)} ${import_picocolors.default.red(localVersion)} \u2192 ${import_picocolors.default.green(latest)}`
229
+ );
230
+ }
231
+ } catch (err) {
232
+ console.error(
233
+ import_picocolors.default.red(`\xD7 Failed to check ${pkg} on npm registry`),
234
+ err
235
+ );
236
+ }
237
+ }
238
+ } catch (err) {
239
+ console.error(import_picocolors.default.red("\xD7 Failed to check outdated packages"), err);
240
+ }
241
+ const pkgManager = getCurrentPackageManager();
242
+ if (endBlock)
243
+ console.log(
244
+ `${import_picocolors.default.gray("|")}
245
+ ${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!")}`
246
+ );
247
+ process.exit(0);
248
+ }
249
+ if (!handled) {
250
+ console.log(
251
+ import_picocolors.default.gray(
252
+ "No option provided. Use 'aristobyte-ui list --help' for usage."
253
+ )
254
+ );
255
+ }
256
+ }
257
+
258
+ // commands/add.ts
259
+ var DEFAULT_PACKAGE = "all";
260
+ async function add(component, options) {
261
+ if (options.list) {
262
+ await list({ all: true }, true);
263
+ }
264
+ const pkgManager = getCurrentPackageManager();
265
+ if (options.packageManager) {
266
+ console.log(`${import_picocolors2.default.cyan("Current package manager:")}
267
+ ${import_picocolors2.default.green("\u25C7")} ${pkgManager}`);
268
+ process.exit(0);
269
+ }
137
270
  const s = (0, import_prompts.spinner)();
271
+ let packageName = DEFAULT_PACKAGE;
272
+ if (!component) {
273
+ console.log(
274
+ `${import_picocolors2.default.green("\u25C7")} ${import_picocolors2.default.white("You did not specify, which package should be added")}
275
+ ${import_picocolors2.default.gray("|")} ${import_picocolors2.default.gray("Please select one of the packages below listed to proceed.")}
276
+ ${import_picocolors2.default.gray("|")}`
277
+ );
278
+ await list({ all: true });
279
+ packageName = await (0, import_prompts.text)({
280
+ message: "Component name to add (Enter to install all components)",
281
+ placeholder: DEFAULT_PACKAGE,
282
+ defaultValue: DEFAULT_PACKAGE
283
+ });
284
+ } else {
285
+ packageName = component;
286
+ }
138
287
  try {
139
- s.start(`Installing ${component}...`);
140
- if (component === "all") {
141
- await installPackage("yarn", "@aristobyte-ui/react");
288
+ s.start(`Installing ${packageName}...`);
289
+ const pkgManager2 = getCurrentPackageManager();
290
+ if (packageName === "all") {
291
+ await installPackage(pkgManager2, "@aristobyte-ui/react");
142
292
  s.stop();
143
- console.log(import_picocolors.default.green("\u2705 All components installed!"));
293
+ console.log(import_picocolors2.default.green("\u2714 All components installed!"));
144
294
  return;
145
295
  }
146
- const pkgName = `@aristobyte-ui/${component}`;
147
- await installPackage("yarn", pkgName);
296
+ const pkgName = `@aristobyte-ui/${packageName}`;
297
+ await installPackage(pkgManager2, pkgName);
148
298
  s.stop();
149
- console.log(import_picocolors.default.green(`\u2705 Component ${component} installed!`));
299
+ console.log(import_picocolors2.default.green(`\u2714 Component ${packageName} installed!`));
150
300
  } catch (err) {
151
301
  s.stop();
152
- console.error(
153
- import_picocolors.default.red(`\u274C Failed to install component ${component}`),
154
- err
155
- );
302
+ console.error(import_picocolors2.default.red(`\xD7 Failed to install package ${packageName}`), err);
156
303
  }
157
304
  }
158
305
 
159
306
  // commands/init.ts
160
307
  var import_execa2 = require("execa");
161
308
  var import_prompts2 = require("@clack/prompts");
162
- var import_picocolors2 = __toESM(require_picocolors());
309
+ var import_picocolors3 = __toESM(require_picocolors());
163
310
  var TEMPLATES = [
164
311
  {
165
312
  id: "aristobyte-ui-template-nextjs-15-app-router",
@@ -179,6 +326,12 @@ var TEMPLATES = [
179
326
  desc: "A Vite template pre-configured with AristoByteUI.",
180
327
  repo: "https://github.com/aristobyte-team/aristobyte-ui-template-vite.git"
181
328
  },
329
+ {
330
+ id: "aristobyte-ui-template-vike",
331
+ name: "Vike",
332
+ desc: "A Vike template pre-configured with AristoByteUI.",
333
+ repo: "https://github.com/aristobyte-team/aristobyte-ui-template-vike.git"
334
+ },
182
335
  {
183
336
  id: "aristobyte-ui-template-astro",
184
337
  name: "Astro",
@@ -186,38 +339,87 @@ var TEMPLATES = [
186
339
  repo: "https://github.com/aristobyte-team/aristobyte-ui-template-astro.git"
187
340
  },
188
341
  {
189
- id: "aristobyte-ui-template-cra",
190
- name: "CRA",
191
- desc: "A Create React App template pre-configured with AristoByteUI.",
192
- repo: "https://github.com/aristobyte-team/aristobyte-ui-template-cra.git"
342
+ id: "aristobyte-ui-template-rsbuild",
343
+ name: "RS Build",
344
+ desc: "An RS Build template pre-configured with AristoByteUI.",
345
+ repo: "https://github.com/aristobyte-team/aristobyte-ui-template-rsbuild.git"
193
346
  }
194
347
  ];
195
348
  var PACKAGE_MANAGERS = ["npm", "yarn", "pnpm", "bun"];
196
349
  var DEFAULT_NAME = "aristobyte-ui-app";
197
- async function init(myProjectName = DEFAULT_NAME) {
198
- console.log(import_picocolors2.default.cyan("\u250C Create a new project"));
199
- const projectNameResult = await (0, import_prompts2.text)({
200
- message: "New project name (Enter to skip with default name)",
201
- placeholder: myProjectName
202
- });
203
- const projectName = (String(projectNameResult) || myProjectName).trim();
204
- const templateIndex = await (0, import_prompts2.select)({
205
- message: "Select a template (Enter to select)",
206
- options: TEMPLATES.map((t, i) => ({
207
- value: i + "",
208
- label: `${t.name} (${t.desc})`
209
- }))
210
- });
211
- const template = TEMPLATES[Number(templateIndex)];
212
- const packageManagerIndex = await (0, import_prompts2.select)({
213
- message: "Select a package manager (Enter to select)",
214
- options: PACKAGE_MANAGERS.map((pm, i) => ({
215
- value: i.toString(),
216
- label: pm
217
- }))
218
- });
219
- const packageManager = PACKAGE_MANAGERS[Number(packageManagerIndex)];
220
- console.log(import_picocolors2.default.cyan("\nTemplate created successfully!\n"));
350
+ async function init(myProjectName, options) {
351
+ if (options.listTemplates) {
352
+ console.log(`${import_picocolors3.default.cyan("Available templates:")}
353
+ ${TEMPLATES.map(
354
+ (t) => `${import_picocolors3.default.green("\u25C7")} ${t.id.split("aristobyte-ui-template-")[1]} - ${import_picocolors3.default.gray(t.desc)}`
355
+ ).join("\n")}`);
356
+ process.exit(0);
357
+ }
358
+ if (options.listPackageManagers) {
359
+ console.log(
360
+ `${import_picocolors3.default.cyan("Available package managers:")}
361
+ ${PACKAGE_MANAGERS.map((pm) => `${import_picocolors3.default.green("\u25C7")} ${pm}`).join("\n")}`
362
+ );
363
+ process.exit(0);
364
+ }
365
+ console.log(import_picocolors3.default.cyan("\u250C Create a new project"));
366
+ let projectName = myProjectName || DEFAULT_NAME;
367
+ if (!myProjectName) {
368
+ projectName = await (0, import_prompts2.text)({
369
+ message: "New project name (Enter to skip with default name)",
370
+ placeholder: DEFAULT_NAME,
371
+ defaultValue: DEFAULT_NAME
372
+ });
373
+ } else {
374
+ console.log(
375
+ `${import_picocolors3.default.gray("\u2502")}
376
+ ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.white("Your project name is:")}
377
+ ${import_picocolors3.default.gray("\u2502")} ${import_picocolors3.default.green(projectName)}`
378
+ );
379
+ }
380
+ let template = TEMPLATES.find(
381
+ (t) => t.id === `aristobyte-ui-template-${options?.template?.toLowerCase()?.replaceAll(" ", "")}`
382
+ );
383
+ if (!template) {
384
+ const templateIndex = await (0, import_prompts2.select)({
385
+ message: "Select a template (Enter to select)",
386
+ options: TEMPLATES.map((t, i) => ({
387
+ value: i.toString(),
388
+ label: `${t.name} (${t.desc})`
389
+ }))
390
+ });
391
+ template = TEMPLATES[Number(templateIndex)];
392
+ } else {
393
+ console.log(
394
+ `${import_picocolors3.default.gray("\u2502")}
395
+ ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.white("Template selected:")}
396
+ ${import_picocolors3.default.gray("\u2502")} ${import_picocolors3.default.green(template.name)}`
397
+ );
398
+ }
399
+ let packageManager = PACKAGE_MANAGERS.find(
400
+ (pm) => pm.toLowerCase() === options.packageManager?.toLowerCase()
401
+ );
402
+ if (!packageManager) {
403
+ const packageManagerIndex = await (0, import_prompts2.select)({
404
+ message: "Select a package manager (Enter to select)",
405
+ options: PACKAGE_MANAGERS.map((pm, i) => ({
406
+ value: i.toString(),
407
+ label: pm
408
+ }))
409
+ });
410
+ packageManager = PACKAGE_MANAGERS[Number(packageManagerIndex)];
411
+ } else {
412
+ console.log(
413
+ `${import_picocolors3.default.gray("\u2502")}
414
+ ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.white("Package manager selected:")}
415
+ ${import_picocolors3.default.gray("\u2502")} ${import_picocolors3.default.green(packageManager)}`
416
+ );
417
+ }
418
+ console.log(
419
+ `${import_picocolors3.default.gray("\u2502")}
420
+ ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.cyan("Template created successfully!")}
421
+ ${import_picocolors3.default.gray("\u2502")}`
422
+ );
221
423
  const s = (0, import_prompts2.spinner)();
222
424
  try {
223
425
  s.start(
@@ -233,83 +435,134 @@ async function init(myProjectName = DEFAULT_NAME) {
233
435
  template.repo,
234
436
  projectName
235
437
  ],
236
- {
237
- stdio: "ignore"
238
- }
438
+ { stdio: "ignore" }
439
+ );
440
+ await (0, import_execa2.execa)("rm", ["-rf", ".git"], { cwd: projectName, stdio: "ignore" });
441
+ s.stop(`${import_picocolors3.default.green("\u2714 Project initialized successfully!")}`);
442
+ console.log(
443
+ `
444
+ ${import_picocolors3.default.gray("\u2502")}
445
+ ${import_picocolors3.default.green("\u25C7")} ${import_picocolors3.default.cyan("To get started:")}
446
+ ${import_picocolors3.default.gray("\u2502")}
447
+ ${import_picocolors3.default.gray("\u251C\u2500")} ${import_picocolors3.default.white("cd " + projectName)}
448
+ ${import_picocolors3.default.gray("\u251C\u2500")} ${import_picocolors3.default.white(`${packageManager} install`)}
449
+ ${import_picocolors3.default.gray("\u251C\u2500")} ${import_picocolors3.default.white(`${packageManager} run dev`)}`
239
450
  );
240
- await (0, import_execa2.execa)("rm", ["-rf", ".git"], { stdio: "ignore", cwd: projectName });
241
- s.stop();
242
- console.log(import_picocolors2.default.green("\u2705 Project initialized successfully!\n"));
243
- console.log(import_picocolors2.default.cyan("Next steps:"));
244
- console.log(import_picocolors2.default.cyan(` cd ${projectName}`));
245
- console.log(import_picocolors2.default.cyan(` ${packageManager} install`));
246
- console.log(import_picocolors2.default.cyan(` ${packageManager} run dev
247
- `));
248
451
  } catch (err) {
249
452
  s.stop();
250
- console.error(import_picocolors2.default.red("\u274C Failed to initialize project"), err);
453
+ console.error(import_picocolors3.default.red("\xD7 Failed to initialize project"), err);
251
454
  }
252
455
  }
253
456
 
254
457
  // commands/remove.ts
255
458
  var import_prompts3 = require("@clack/prompts");
256
459
  var import_execa3 = require("execa");
257
- var import_picocolors3 = __toESM(require_picocolors());
258
- async function remove(component) {
460
+ var import_picocolors4 = __toESM(require_picocolors());
461
+ async function remove(component, options) {
462
+ if (options.list) {
463
+ await list({ installed: true }, true);
464
+ }
465
+ const pkgManager = getCurrentPackageManager();
466
+ if (options.packageManager) {
467
+ console.log(`${import_picocolors4.default.cyan("Current package manager:")}
468
+ ${import_picocolors4.default.green("\u25C7")} ${pkgManager}`);
469
+ process.exit(0);
470
+ }
259
471
  const s = (0, import_prompts3.spinner)();
472
+ let packageName;
473
+ if (!component) {
474
+ console.log(
475
+ `${import_picocolors4.default.green("\u25C7")} ${import_picocolors4.default.white("You did not specify, which package should be removed")}
476
+ ${import_picocolors4.default.gray("|")} ${import_picocolors4.default.gray("Please select one of the installed packages below to proceed.")}
477
+ ${import_picocolors4.default.gray("|")}`
478
+ );
479
+ await list({ installed: true });
480
+ packageName = await (0, import_prompts3.text)({
481
+ message: `Component name to remove (Required filled)`,
482
+ placeholder: "<package-name>"
483
+ });
484
+ } else {
485
+ packageName = component;
486
+ }
487
+ if (!packageName) {
488
+ console.log(
489
+ import_picocolors4.default.red(
490
+ `Invalid Package name. <package-name> should be specified:
491
+ aristobyte-ui remove <package-name>`
492
+ )
493
+ );
494
+ return;
495
+ }
260
496
  try {
261
- const pkgName = component === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${component}`;
497
+ const pkgName = packageName === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${packageName}`;
262
498
  s.start(`Removing ${pkgName}...`);
263
- await (0, import_execa3.execa)("yarn", ["remove", pkgName], { stdio: "inherit" });
499
+ await (0, import_execa3.execa)(pkgManager, ["remove", pkgName], { stdio: "inherit" });
264
500
  s.stop();
265
- console.log(import_picocolors3.default.green(`\u2705 ${pkgName} removed successfully!`));
501
+ console.log(import_picocolors4.default.green(`\u2714 ${pkgName} removed successfully!`));
266
502
  } catch (err) {
267
503
  s.stop();
268
- console.error(import_picocolors3.default.red(`\u274C Failed to remove component ${component}`), err);
504
+ console.error(
505
+ import_picocolors4.default.red(`\xD7 Failed to remove component ${packageName}`),
506
+ err
507
+ );
269
508
  }
270
509
  }
271
510
 
272
511
  // commands/upgrade.ts
273
512
  var import_prompts4 = require("@clack/prompts");
274
513
  var import_execa4 = require("execa");
275
- var import_picocolors4 = __toESM(require_picocolors());
276
- async function upgrade(component) {
277
- const s = (0, import_prompts4.spinner)();
278
- try {
279
- const pkgName = component === "all" ? "@aristobyte-ui/react" : `@aristobyte-ui/${component}`;
280
- s.start(`Upgrading ${pkgName}...`);
281
- await (0, import_execa4.execa)("yarn", ["upgrade", pkgName], { stdio: "inherit" });
282
- s.stop();
283
- console.log(import_picocolors4.default.green(`\u2705 ${pkgName} upgraded successfully!`));
284
- } catch (err) {
285
- s.stop();
286
- console.error(
287
- import_picocolors4.default.red(`\u274C Failed to upgrade component ${component}`),
288
- err
514
+ var import_picocolors5 = __toESM(require_picocolors());
515
+ async function upgrade(component, options) {
516
+ if (!component && !options.all) {
517
+ console.error(import_picocolors5.default.red("\xD7 No component specified for upgrade."));
518
+ console.log(
519
+ import_picocolors5.default.gray(
520
+ "Use: 'aristobyte-ui upgrade <component>' or 'aristobyte-ui upgrade --all'"
521
+ )
289
522
  );
523
+ process.exit(0);
290
524
  }
291
- }
292
-
293
- // commands/list.ts
294
- var import_fs = __toESM(require("fs"));
295
- var import_picocolors5 = __toESM(require_picocolors());
296
- async function list() {
525
+ const s = (0, import_prompts4.spinner)();
526
+ const pkgManager = getCurrentPackageManager();
297
527
  try {
298
- const pkgJson = JSON.parse(import_fs.default.readFileSync("package.json", "utf-8"));
299
- const deps = pkgJson.dependencies || {};
300
- const aristobyteDeps = Object.keys(deps).filter(
301
- (d) => d.startsWith("@aristobyte-ui/")
528
+ const isAll = options.all || component === "all";
529
+ const targets = isAll ? ["@aristobyte-ui/react"] : component ? [`@aristobyte-ui/${component}`] : [];
530
+ if (targets.length === 0) {
531
+ console.error(import_picocolors5.default.red("\xD7 No component specified for upgrade."));
532
+ console.log(
533
+ import_picocolors5.default.gray("Use: aristobyte-ui upgrade <component> or --all")
534
+ );
535
+ process.exit(1);
536
+ }
537
+ const versionSuffix = options.to ? `@${options.to}` : "";
538
+ const sLabel = isAll ? "Upgrading all AristoByteUI components..." : `Upgrading ${targets.join(", ")}...`;
539
+ s.start(sLabel);
540
+ for (const pkg of targets) {
541
+ const fullSpecifier = `${pkg}${versionSuffix}`;
542
+ await (0, import_execa4.execa)(pkgManager, ["upgrade", fullSpecifier], {
543
+ stdio: "inherit"
544
+ });
545
+ }
546
+ s.stop();
547
+ console.log(
548
+ import_picocolors5.default.green(
549
+ `\u2714 Upgrade complete${options.to ? ` \u2192 version ${options.to}` : ""}!`
550
+ )
302
551
  );
303
- console.log(import_picocolors5.default.blue("Installed AristoByteUI components:"));
304
- aristobyteDeps.forEach((dep) => console.log(import_picocolors5.default.green(dep)));
305
552
  } catch (err) {
306
- console.error(import_picocolors5.default.red("\u274C Failed to list components"), err);
553
+ s.stop();
554
+ console.error(import_picocolors5.default.red(`\xD7 Upgrade failed.`));
555
+ console.error(import_picocolors5.default.dim(String(err)));
307
556
  }
308
557
  }
309
558
 
310
559
  // commands/doctor.ts
560
+ var import_fs3 = __toESM(require("fs"));
561
+ var import_path2 = __toESM(require("path"));
562
+ var import_os = __toESM(require("os"));
311
563
  var import_child_process = require("child_process");
312
564
  var import_prompts5 = require("@clack/prompts");
565
+ var import_picocolors7 = __toESM(require_picocolors());
313
566
 
314
567
  // utils/compareVersions.ts
315
568
  function compareVersions(v1, v2) {
@@ -322,97 +575,280 @@ function compareVersions(v1, v2) {
322
575
  return 0;
323
576
  }
324
577
 
325
- // commands/doctor.ts
578
+ // utils/checkVersion.ts
326
579
  var import_picocolors6 = __toESM(require_picocolors());
327
- var MIN_NODE_VERSION = "20.19.0";
328
- async function doctor() {
580
+ function checkVersion(name, version, minVersion) {
581
+ if (version === "unknown" || compareVersions(version, minVersion) < 0) {
582
+ return import_picocolors6.default.red(`\xD7 ${name} >= ${minVersion} required`);
583
+ }
584
+ return import_picocolors6.default.green(`\u2714 ${version}`);
585
+ }
586
+
587
+ // commands/doctor.ts
588
+ var MIN_VERSIONS = {
589
+ node: "20.19.0",
590
+ pnpm: "10.15.1",
591
+ npm: "10.8.2",
592
+ yarn: "1.22.22",
593
+ bun: "1.2.21"
594
+ };
595
+ function getVersion(command, name) {
596
+ try {
597
+ return (0, import_child_process.execSync)(command).toString().trim();
598
+ } catch (err) {
599
+ console.error(import_picocolors7.default.red(`\xD7 Failed to detect ${name} version:`), err);
600
+ return "unknown";
601
+ }
602
+ }
603
+ function hasProjectPackage(name) {
604
+ try {
605
+ const pkgJson = JSON.parse(import_fs3.default.readFileSync("package.json", "utf-8"));
606
+ return pkgJson.dependencies && pkgJson.dependencies[name] || pkgJson.devDependencies && pkgJson.devDependencies[name];
607
+ } catch {
608
+ return false;
609
+ }
610
+ }
611
+ function detectUISetup() {
612
+ const configPaths = [
613
+ "tailwind.config.js",
614
+ "tailwind.config.ts",
615
+ "postcss.config.js",
616
+ "postcss.config.ts"
617
+ ];
618
+ return configPaths.filter((p) => import_fs3.default.existsSync(import_path2.default.resolve(p)));
619
+ }
620
+ async function checkNetwork() {
621
+ try {
622
+ const res = await fetch(
623
+ "https://registry.npmjs.org/-/org/aristobyte-ui/package",
624
+ { method: "HEAD" }
625
+ );
626
+ return res.ok;
627
+ } catch {
628
+ return false;
629
+ }
630
+ }
631
+ async function doctor(options) {
329
632
  const s = (0, import_prompts5.spinner)();
330
633
  try {
331
- s.start("Running project health checks...");
332
- let nodeVersion = "unknown";
333
- try {
334
- nodeVersion = (0, import_child_process.execSync)("node -v").toString().trim();
335
- } catch (err) {
336
- console.error(import_picocolors6.default.red("\u274C Failed to detect Node version:"), err);
634
+ s.start("Running doctor diagnostics\u2026");
635
+ console.log(
636
+ `${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Doctor Diagnostics")}
637
+ ${import_picocolors7.default.gray("|")}`
638
+ );
639
+ const system = {
640
+ os: `${import_os.default.type()} ${import_os.default.release()} (${import_os.default.platform()})`,
641
+ cpu: import_os.default.cpus()[0].model,
642
+ memoryMB: Math.round(import_os.default.totalmem() / 1024 / 1024),
643
+ node: getVersion("node -v", "Node")
644
+ };
645
+ const pkgManager = getCurrentPackageManager();
646
+ const pmVersion = getVersion(`${pkgManager} -v`, pkgManager);
647
+ const uiInstalled = hasProjectPackage("@aristobyte-ui/react");
648
+ const pluginInstalled = hasProjectPackage("@aristobyte-ui/plugin");
649
+ const configs = detectUISetup();
650
+ let networkOnline;
651
+ if (options.network || options.all || Object.keys(options).length === 0) {
652
+ networkOnline = await checkNetwork();
337
653
  }
338
- let nodeStatus = "\u2705 OK";
339
- if (nodeVersion !== "unknown" && compareVersions(nodeVersion, MIN_NODE_VERSION) < 0) {
340
- nodeStatus = import_picocolors6.default.red(`\u274C Node >= ${MIN_NODE_VERSION} required`);
654
+ const payload = {
655
+ system,
656
+ packageManager: { name: pkgManager, version: pmVersion },
657
+ installedPackages: { ui: uiInstalled, plugin: pluginInstalled },
658
+ configs,
659
+ network: networkOnline
660
+ };
661
+ if (options.json) {
662
+ console.log(
663
+ `${import_picocolors7.default.gray("|")}
664
+ ${import_picocolors7.default.gray("\u25C7 ------ JSON start ------ \u25C7")}
665
+ ${JSON.stringify(payload, null, 2)}
666
+ ${import_picocolors7.default.gray("\u25C7 ------ JSON end ------ \u25C7")}
667
+ ${import_picocolors7.default.gray("|")}`
668
+ );
341
669
  }
342
- let yarnVersion = "unknown";
343
- try {
344
- yarnVersion = (0, import_child_process.execSync)("yarn -v").toString().trim();
345
- } catch (err) {
346
- console.error(import_picocolors6.default.red("\u274C Failed to detect Yarn version:"), err);
670
+ if (options.system || options.all || Object.keys(options).length === 0) {
671
+ console.log(
672
+ `${options.system ? "" : "\n"}${import_picocolors7.default.gray("|")}
673
+ ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("System:")}
674
+ ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("OS:")} ${import_picocolors7.default.green(system.os)}
675
+ ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("CPU:")} ${import_picocolors7.default.green(system.cpu)}
676
+ ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("Memory:")} ${import_picocolors7.default.green(`${system.memoryMB} MB`)}
677
+ ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("Node:")} ${checkVersion("Node", system.node, MIN_VERSIONS.node)}`
678
+ );
347
679
  }
348
- s.stop();
349
- console.log(import_picocolors6.default.green(`Node version: ${nodeVersion} ${nodeStatus}`));
350
- console.log(import_picocolors6.default.green(`Yarn version: ${yarnVersion}`));
351
- console.log(import_picocolors6.default.green("All basic health checks completed!"));
680
+ if (options.pm || options.all || Object.keys(options).length === 0) {
681
+ console.log(
682
+ `${import_picocolors7.default.gray("|")}
683
+ ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Package Manager:")}
684
+ ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("Current:")} ${import_picocolors7.default.green(pkgManager)}
685
+ ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("Version:")} ${checkVersion(pkgManager, pmVersion, MIN_VERSIONS[pkgManager])}`
686
+ );
687
+ }
688
+ if (options.deps || options.all || Object.keys(options).length === 0) {
689
+ console.log(
690
+ `${import_picocolors7.default.gray("|")}
691
+ ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Project Dependencies:")}
692
+ ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("@aristobyte-ui/react:")} ${uiInstalled ? import_picocolors7.default.green("\u2714 Installed") : import_picocolors7.default.red("\xD7 Missing")}
693
+ ${import_picocolors7.default.gray("|")} ${import_picocolors7.default.white("@aristobyte-ui/plugin:")} ${pluginInstalled ? import_picocolors7.default.green("\u2714 Installed") : import_picocolors7.default.red("\xD7 Missing")}`
694
+ );
695
+ }
696
+ if (options.configs || options.all || Object.keys(options).length === 0) {
697
+ console.log(
698
+ `${import_picocolors7.default.gray("|")}
699
+ ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Config Files:")}`
700
+ );
701
+ if (!configs.length) {
702
+ console.log(
703
+ `${import_picocolors7.default.gray("|")} ${import_picocolors7.default.red("\xD7 No config files detected")}`
704
+ );
705
+ } else {
706
+ configs.forEach(
707
+ (cfg) => console.log(
708
+ `${import_picocolors7.default.gray("|")} ${import_picocolors7.default.green("\u2714")} ${import_picocolors7.default.white(cfg)}`
709
+ )
710
+ );
711
+ }
712
+ }
713
+ if ((options.network || options.all || Object.keys(options).length === 0) && networkOnline !== void 0) {
714
+ console.log(
715
+ `${options.network ? "\n" : ""}${import_picocolors7.default.gray("|")}
716
+ ${import_picocolors7.default.green("\u25C7")} ${import_picocolors7.default.cyan("Network:")}
717
+ ${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")}`}`
718
+ );
719
+ }
720
+ console.log(import_picocolors7.default.gray("|"));
721
+ s.stop(import_picocolors7.default.green("\u2714 Doctor diagnostics finished successfully!"));
352
722
  } catch (err) {
353
- s.stop();
354
- console.error(import_picocolors6.default.red("\u274C Doctor check failed"), err);
723
+ s.stop(import_picocolors7.default.red("\xD7 Doctor diagnostics failed"));
724
+ console.error(import_picocolors7.default.red("\xD7 Diagnostics crashed"), err);
355
725
  }
356
726
  }
357
727
 
358
728
  // commands/env.ts
359
- var import_os = __toESM(require("os"));
729
+ var import_os2 = __toESM(require("os"));
730
+ var import_fs4 = __toESM(require("fs"));
360
731
  var import_child_process2 = require("child_process");
361
732
  var import_prompts6 = require("@clack/prompts");
362
-
363
- // utils/checkVersion.ts
364
- var import_picocolors7 = __toESM(require_picocolors());
365
- function checkVersion(name, version, minVersion) {
366
- if (version === "unknown" || compareVersions(version, minVersion) < 0) {
367
- return import_picocolors7.default.red(`\u274C ${name} >= ${minVersion} required`);
368
- }
369
- return import_picocolors7.default.green(`\u2705 ${version}`);
370
- }
371
-
372
- // commands/env.ts
373
733
  var import_picocolors8 = __toESM(require_picocolors());
374
- var MIN_VERSIONS = {
375
- node: "20.17.0",
734
+ var MIN_VERSIONS2 = {
735
+ node: "20.19.0",
736
+ pnpm: "10.15.1",
376
737
  npm: "10.8.2",
377
- yarn: "1.22.22"
738
+ yarn: "1.22.22",
739
+ bun: "1.2.21"
378
740
  };
379
- function getVersion(command, name) {
741
+ function getVersion2(command, name) {
380
742
  try {
381
743
  return (0, import_child_process2.execSync)(command).toString().trim();
382
744
  } catch (err) {
383
- console.error(import_picocolors8.default.red(`\u274C Failed to detect ${name} version:`), err);
745
+ console.error(import_picocolors8.default.red(`\xD7 Failed to detect ${name} version:`), err);
384
746
  return "unknown";
385
747
  }
386
748
  }
387
- async function env() {
749
+ function getSystemInfo() {
750
+ return {
751
+ os: `${import_os2.default.type()} ${import_os2.default.release()} (${import_os2.default.platform()})`,
752
+ cpu: import_os2.default.cpus()[0].model,
753
+ memoryMB: Math.round(import_os2.default.totalmem() / 1024 / 1024),
754
+ node: getVersion2("node -v", "Node")
755
+ };
756
+ }
757
+ function getPackageManagerInfo() {
758
+ const current = getCurrentPackageManager();
759
+ return {
760
+ packageManager: current,
761
+ version: getVersion2(`${current} -v`, current)
762
+ };
763
+ }
764
+ function getInstalledPackages() {
765
+ try {
766
+ const pkgJson = JSON.parse(import_fs4.default.readFileSync("package.json", "utf-8"));
767
+ const deps = pkgJson.dependencies || {};
768
+ return Object.keys(deps).filter((d) => d.startsWith("@aristobyte-ui/")).map((dep) => dep.includes("react") ? "all" : dep.split("/")[1]);
769
+ } catch {
770
+ return [];
771
+ }
772
+ }
773
+ async function checkNetwork2() {
774
+ const url = "https://registry.npmjs.org/-/org/aristobyte-ui/package";
775
+ try {
776
+ const res = await fetch(url, { method: "HEAD" });
777
+ return res.ok;
778
+ } catch {
779
+ return false;
780
+ }
781
+ }
782
+ async function env(options) {
388
783
  const s = (0, import_prompts6.spinner)();
389
784
  try {
390
- s.start("Fetching system environment info...");
391
- const nodeVersion = getVersion("node -v", "Node");
392
- const npmVersion = getVersion("npm -v", "npm");
393
- const yarnVersion = getVersion("yarn -v", "Yarn");
394
- s.stop();
395
- console.log(import_picocolors8.default.blue("System Environment Info:"));
785
+ s.start("Collecting environment diagnostics\u2026");
396
786
  console.log(
397
- import_picocolors8.default.green(`OS: ${import_os.default.type()} ${import_os.default.release()} (${import_os.default.platform()})`)
398
- );
399
- console.log(import_picocolors8.default.green(`CPU: ${import_os.default.cpus()[0].model}`));
400
- console.log(
401
- import_picocolors8.default.green(`Memory: ${(import_os.default.totalmem() / 1024 / 1024).toFixed(0)} MB`)
402
- );
403
- console.log(
404
- `Node: ${checkVersion("Node", nodeVersion, MIN_VERSIONS.node)}`
405
- );
406
- console.log(`npm: ${checkVersion("npm", npmVersion, MIN_VERSIONS.npm)}`);
407
- console.log(
408
- `Yarn: ${checkVersion("Yarn", yarnVersion, MIN_VERSIONS.yarn)}`
787
+ `${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Environment Diagnostics")}
788
+ ${import_picocolors8.default.gray("|")}`
409
789
  );
790
+ const system = getSystemInfo();
791
+ const pm = getPackageManagerInfo();
792
+ const installed = options.packages || options.all || Object.keys(options).length === 0 ? getInstalledPackages() : [];
793
+ const networkOnline = options.network || options.all || Object.keys(options).length === 0 ? await checkNetwork2() : void 0;
794
+ const payload = {
795
+ system,
796
+ packageManager: pm,
797
+ installedPackages: installed,
798
+ network: networkOnline
799
+ };
800
+ if (options.json) {
801
+ console.log(`${import_picocolors8.default.gray("|")}
802
+ ${import_picocolors8.default.gray("\u25C7 ------ JSON file start ------ \u25C7")}
803
+ ${JSON.stringify(payload, null, 2)}
804
+ ${import_picocolors8.default.gray("\u25C7 ------ JSON file end ------ \u25C7")}
805
+ ${import_picocolors8.default.gray("|")}`);
806
+ }
807
+ if (options.system || options.all || Object.keys(options).length === 0) {
808
+ console.log(`${options.all || Object.keys(options).length === 0 ? "\n" : ""}${import_picocolors8.default.gray("|")}
809
+ ${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("System:")}
810
+ ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("OS:")} ${import_picocolors8.default.green(`${system.os}`)}
811
+ ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("CPU:")} ${import_picocolors8.default.green(`${system.cpu}`)}
812
+ ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("Memory:")} ${import_picocolors8.default.green(`${system.memoryMB} MB`)}
813
+ ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("Node:")} ${checkVersion("Node", system.node, MIN_VERSIONS2.node)}`);
814
+ }
815
+ if (options.pm || options.all || Object.keys(options).length === 0) {
816
+ console.log(`${import_picocolors8.default.gray("|")}
817
+ ${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Package Manager:")}
818
+ ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("Current:")} ${import_picocolors8.default.green(pm.packageManager)}
819
+ ${import_picocolors8.default.gray("|")} ${import_picocolors8.default.white("Version:")} ${import_picocolors8.default.green(
820
+ checkVersion(
821
+ pm.packageManager,
822
+ pm.version,
823
+ MIN_VERSIONS2[pm.packageManager]
824
+ )
825
+ )}`);
826
+ }
827
+ if (options.packages || options.all || Object.keys(options).length === 0) {
828
+ console.log(
829
+ `${import_picocolors8.default.gray("|")}
830
+ ${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Installed AristoByteUI Packages:")}`
831
+ );
832
+ if (!installed.length) {
833
+ console.log(import_picocolors8.default.gray(" (none detected)"));
834
+ } else {
835
+ installed.forEach(
836
+ (p) => console.log(
837
+ `${import_picocolors8.default.gray("|")} ${import_picocolors8.default.green("-")} ${import_picocolors8.default.white(p)}`
838
+ )
839
+ );
840
+ }
841
+ }
842
+ if (options.network || options.all || Object.keys(options).length === 0) {
843
+ console.log(`${options.network ? "\n" : ""}${import_picocolors8.default.gray("|")}
844
+ ${import_picocolors8.default.green("\u25C7")} ${import_picocolors8.default.cyan("Network:")}
845
+ ${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")}`}`);
846
+ }
847
+ console.log(import_picocolors8.default.gray("|"));
848
+ s.stop(import_picocolors8.default.green("\u2714 Environment diagnostics finished with success!"));
410
849
  } catch (err) {
411
- s.stop();
412
- console.error(
413
- import_picocolors8.default.red("\u274C Failed to fetch system environment info:"),
414
- err
415
- );
850
+ s.stop(import_picocolors8.default.red("\xD7 Environment diagnostics finished with failure :("));
851
+ console.error(import_picocolors8.default.red("\xD7 Environment diagnostics failed"), err);
416
852
  }
417
853
  }
418
854
 
@@ -420,28 +856,28 @@ async function env() {
420
856
  var import_chalk = __toESM(require("chalk"));
421
857
  var import_gradient_string = __toESM(require("gradient-string"));
422
858
  var LOGO_COLORS = ["#ffee27", "#fec800", "#f18e35", "#e95f32", "#e2312d"];
423
- function logo3(text2) {
424
- return import_chalk.default.hex(LOGO_COLORS[2])(text2);
859
+ function logo3(text4) {
860
+ return import_chalk.default.hex(LOGO_COLORS[2])(text4);
425
861
  }
426
- function logo4(text2) {
427
- return import_chalk.default.hex(LOGO_COLORS[3])(text2);
862
+ function logo4(text4) {
863
+ return import_chalk.default.hex(LOGO_COLORS[3])(text4);
428
864
  }
429
- function lightGrey(text2) {
430
- return import_chalk.default.hex("#afbfff")(text2);
865
+ function lightGrey(text4) {
866
+ return import_chalk.default.hex("#afbfff")(text4);
431
867
  }
432
- function darkGrey(text2) {
433
- return import_chalk.default.hex("#7580aa")(text2);
868
+ function darkGrey(text4) {
869
+ return import_chalk.default.hex("#7580aa")(text4);
434
870
  }
435
- function logoGradient(text2) {
871
+ function logoGradient(text4) {
436
872
  return (0, import_gradient_string.default)([
437
873
  ...LOGO_COLORS,
438
874
  ...LOGO_COLORS.reverse(),
439
875
  ...LOGO_COLORS,
440
876
  ...LOGO_COLORS.reverse(),
441
877
  ...LOGO_COLORS
442
- ]).multiline(text2);
878
+ ]).multiline(text4);
443
879
  }
444
- function logoSmallGradient(text2) {
880
+ function logoSmallGradient(text4) {
445
881
  return (0, import_gradient_string.default)([
446
882
  LOGO_COLORS[0],
447
883
  LOGO_COLORS[1],
@@ -449,84 +885,187 @@ function logoSmallGradient(text2) {
449
885
  LOGO_COLORS[0],
450
886
  LOGO_COLORS[0],
451
887
  LOGO_COLORS[1]
452
- ]).multiline(text2);
453
- }
454
-
455
- // utils/getBanner.ts
456
- var banners = [
457
- ` \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
458
- \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
459
- \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
460
- \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
461
- \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
462
- \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
463
- \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
464
- \u2591\u2588\u2588
465
- \u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588 `,
466
- ` \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
467
- \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
468
- \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
469
- \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`,
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
- /____/ `,
496
- ` \u2588\u2588
497
- \u2592\u2588\u2588\u2592 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2592 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
498
- \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
499
- \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2592\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
500
- \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
501
- \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
502
- \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
503
- \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
504
- \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
505
- \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
506
- \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
507
- \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
508
- \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
509
- \u2592\u2588\u2588
510
- \u2588\u2588\u2588\u2592
511
- \u2588\u2588\u2588 `
512
- ];
513
- function getBanner() {
514
- return logoGradient(banners[0]);
888
+ ]).multiline(text4);
515
889
  }
516
890
 
517
891
  // utils/typography.ts
518
892
  function usage(params) {
519
893
  return params.map((param) => `${logo4("[")} ${lightGrey(param)} ${logo4("]")}`).join(" ");
520
894
  }
521
- function description(text2) {
522
- return darkGrey(`- ${text2}`);
895
+ function description(text4) {
896
+ return darkGrey(`- ${text4}`);
897
+ }
898
+
899
+ // utils/getBanner.ts
900
+ 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
901
+ \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
902
+ \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
903
+ \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
904
+ \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
905
+ \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
906
+ \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
907
+ \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
908
+ \u2588\u2588\u2588 \u2591\u2588\u2588\u2588
909
+ \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588
910
+ \u2591\u2591\u2591\u2591\u2591\u2591 `;
911
+ var initBanner = ` \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
912
+ \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2591 \u2591\u2591\u2588\u2588\u2588
913
+ \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
914
+ \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
915
+ \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
916
+ \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588
917
+ \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
918
+ \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 `;
919
+ var addBanner = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
920
+ \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588
921
+ \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
922
+ \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
923
+ \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
924
+ \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
925
+ \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
926
+ \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 `;
927
+ var removeBanner = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588
928
+ \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588
929
+ \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
930
+ \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
931
+ \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
932
+ \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
933
+ \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
934
+ \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 `;
935
+ var doctorBanner = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
936
+ \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588
937
+ \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
938
+ \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
939
+ \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
940
+ \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
941
+ \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
942
+ \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 `;
943
+ var envBanner = ` \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588
944
+ \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588
945
+ \u2591\u2588\u2588\u2588 \u2588 \u2591 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
946
+ \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
947
+ \u2591\u2588\u2588\u2588\u2591\u2591\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
948
+ \u2591\u2588\u2588\u2588 \u2591 \u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588
949
+ \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
950
+ \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 `;
951
+ var listBanner = ` \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
952
+ \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2591 \u2591\u2591\u2588\u2588\u2588
953
+ \u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588
954
+ \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591 \u2591\u2591\u2591\u2588\u2588\u2588\u2591
955
+ \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588
956
+ \u2591\u2588\u2588\u2588 \u2588 \u2591\u2588\u2588\u2588 \u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588\u2588\u2588
957
+ \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
958
+ \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 `;
959
+ var upgradeBanner = ` \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588
960
+ \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588
961
+ \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
962
+ \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
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 \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
964
+ \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
965
+ \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
966
+ \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
967
+ \u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588
968
+ \u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588
969
+ \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 `;
970
+ function getBanner(id) {
971
+ switch (id) {
972
+ case "add":
973
+ return logoGradient(addBanner);
974
+ case "doctor":
975
+ return logoGradient(doctorBanner);
976
+ case "env":
977
+ return logoGradient(envBanner);
978
+ case "init":
979
+ return logoGradient(initBanner);
980
+ case "list":
981
+ return logoGradient(listBanner);
982
+ case "remove":
983
+ return logoGradient(removeBanner);
984
+ case "upgrade":
985
+ return logoGradient(upgradeBanner);
986
+ case "aristobyte-ui":
987
+ default:
988
+ return logoGradient(mainBanner);
989
+ }
990
+ }
991
+
992
+ // utils/getTip.ts
993
+ function getTip(id) {
994
+ switch (id) {
995
+ case "init":
996
+ 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.";
997
+ case "add":
998
+ return "Use 'aristobyte-ui add [ component ]' to install a specific UI component.\n Combine multiple components for faster setup.";
999
+ case "remove":
1000
+ return "Run 'aristobyte-ui remove [ component ]' to cleanly uninstall components.\n Useful for maintaining a lightweight project.";
1001
+ case "upgrade":
1002
+ return "Use 'aristobyte-ui upgrade [ component ]' to update components or core packages.\n Add '--all' to upgrade everything at once.";
1003
+ case "list":
1004
+ return "Run 'aristobyte-ui list' to view installed components and versions.\n Add '--outdated' to check for available updates.";
1005
+ case "doctor":
1006
+ return "Execute 'aristobyte-ui doctor' to analyze your setup.\n Fixes and recommendations will be displayed for common issues.";
1007
+ case "env":
1008
+ return "Run 'aristobyte-ui env' to inspect your development environment.\n Helpful for debugging version or configuration conflicts.";
1009
+ case "aristobyte-ui":
1010
+ default:
1011
+ return "Use 'aristobyte-ui [ command ] --help' for detailed info on a command.";
1012
+ }
1013
+ }
1014
+
1015
+ // utils/getDescription.ts
1016
+ function getDescription(id) {
1017
+ switch (id) {
1018
+ case "init":
1019
+ return "Initialize a new AristoByteUI project from pre-configured templates.\n Supports automatic project setup, template selection, and package manager configuration.";
1020
+ case "add":
1021
+ return "Add new UI components to your existing AristoByteUI project.\n Handles component installation, configuration, and dependency management.";
1022
+ case "remove":
1023
+ return "Remove installed AristoByteUI components cleanly from your project.\n Ensures proper cleanup of related files and dependencies.";
1024
+ case "upgrade":
1025
+ return "Upgrade AristoByteUI components or core packages to their latest versions.\n Supports selective or full project upgrades.";
1026
+ case "list":
1027
+ return "List all installed AristoByteUI components in your project.\n Displays version, status, and available updates for each component.";
1028
+ case "doctor":
1029
+ return "Run a system and project health check.\n Detects configuration issues, missing dependencies, and environment mismatches.";
1030
+ case "env":
1031
+ return "Display detailed environment information.\n Includes Node.js version, package manager details, and AristoByteUI configuration paths.";
1032
+ case "aristobyte-ui":
1033
+ default:
1034
+ 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.";
1035
+ }
1036
+ }
1037
+
1038
+ // utils/parseHelp.ts
1039
+ function parseHelp(cmd, helper) {
1040
+ return `
1041
+ ${getBanner(cmd.name())}
1042
+
1043
+ ${logoSmallGradient("Usage:")}
1044
+ ${logo3(helper.commandUsage(cmd))}
1045
+
1046
+ ${logoSmallGradient("Description:")}
1047
+ ${darkGrey(getDescription(cmd.name()))}
1048
+
1049
+ ${helper.visibleCommands(cmd).length > 0 ? `${logoSmallGradient("Commands:")}
1050
+ ${helper.visibleCommands(cmd).map(
1051
+ (c) => ` ${`${logo3(c.name()).padEnd(31)} ${c.usage() || "".padEnd(30)}`.padEnd(129)} ${description(c.description())}`
1052
+ ).join("\n")}
1053
+
1054
+ ` : ""}${helper.visibleOptions(cmd).length > 0 ? `${logoSmallGradient("Options:")}
1055
+ ${helper.visibleOptions(cmd).map(
1056
+ (option) => ` ${`${logo3(option.flags.split(/,\s*/)[0])}${darkGrey(", ")}${logo4(option.flags.split(/,\s*/)[1])}`.padEnd(93)} ${description(option.description)}`
1057
+ ).join("\n")}
1058
+
1059
+ ` : ""}${logoSmallGradient("Tip:")}
1060
+ ${lightGrey(getTip(cmd.name()))}
1061
+ `;
523
1062
  }
524
1063
 
525
1064
  // package.json
526
1065
  var package_default = {
527
1066
  name: "@aristobyte-ui/cli",
528
1067
  description: "The official AristoByteUI CLI \u2014 initialize projects, install, upgrade, remove, and manage UI components seamlessly.",
529
- version: "1.0.109",
1068
+ version: "1.0.111",
530
1069
  license: "MIT",
531
1070
  private: false,
532
1071
  author: "AristoByte <info@aristobyte.com>",
@@ -582,8 +1121,8 @@ var package_default = {
582
1121
  "check-types": "tsc --noEmit"
583
1122
  },
584
1123
  dependencies: {
585
- "@aristobyte-ui/eslint-config": "^1.0.109",
586
- "@aristobyte-ui/typescript-config": "^1.0.109",
1124
+ "@aristobyte-ui/eslint-config": "^1.0.111",
1125
+ "@aristobyte-ui/typescript-config": "^1.0.111",
587
1126
  "@clack/prompts": "^0.11.0",
588
1127
  axios: "^1.6.0",
589
1128
  chalk: "^5.6.1",
@@ -614,49 +1153,46 @@ var COMMANDS = [
614
1153
  "help"
615
1154
  ];
616
1155
  var aristobyteui = new import_commander.Command();
617
- 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");
618
- aristobyteui.command("init").usage(usage(["options", "myProjectName"])).description("Initialize a new AristoByteUI project").action((myProjectName) => {
619
- init(myProjectName);
1156
+ aristobyteui.name("aristobyte-ui").usage(usage(["command", "options"])).description(
1157
+ "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."
1158
+ ).version(package_default.version, "-V, --version", "Output the CLI version").helpOption("-H, --help", "Show help information").configureHelp({
1159
+ formatHelp: (cmd, helper) => parseHelp(cmd, helper)
620
1160
  });
621
- aristobyteui.command("add").usage(usage(["options", "components..."])).description("Add a UI component").action(add);
622
- aristobyteui.command("remove").usage(usage(["options", "components..."])).description("Remove a UI component").action(remove);
623
- aristobyteui.command("upgrade").usage(usage(["options", "components..."])).description("Upgrade a UI component").action(upgrade);
624
- aristobyteui.command("list").usage(usage(["options"])).description("List installed components").action(list);
625
- aristobyteui.command("doctor").usage(usage(["options"])).description("Check system and project health").action(doctor);
626
- aristobyteui.command("env").usage(usage(["options"])).description("Display environment info").action(env);
1161
+ 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(
1162
+ "-LPM, --list-package-managers",
1163
+ "Display a list of available package managers"
1164
+ ).option("-T, --template <templateName>", "Specify a template to use").option(
1165
+ "-P, --package-manager <packageManager>",
1166
+ "Select a package manager (npm, yarn, pnpm, bun)"
1167
+ ).configureHelp({
1168
+ formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1169
+ }).action(init);
1170
+ 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(
1171
+ "-P, --package-manager",
1172
+ "Show the package manager used in current project"
1173
+ ).configureHelp({
1174
+ formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1175
+ }).action(add);
1176
+ 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(
1177
+ "-P, --package-manager",
1178
+ "Show the package manager used in current project"
1179
+ ).configureHelp({
1180
+ formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1181
+ }).action(remove);
1182
+ 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({
1183
+ formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1184
+ }).action(upgrade);
1185
+ 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({
1186
+ formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1187
+ }).action((options) => list(options, true));
1188
+ 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({
1189
+ formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1190
+ }).action(doctor);
1191
+ 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({
1192
+ formatHelp: (cmd, helper) => parseHelp(cmd, helper)
1193
+ }).action(env);
627
1194
  aristobyteui.command("help").usage(usage(["options"])).description("Display help for command").action(env);
628
1195
  aristobyteui.command("help", { hidden: true });
629
- aristobyteui.configureHelp({
630
- formatHelp: (cmd, helper) => `
631
- ${getBanner()}
632
- ${logoSmallGradient("Usage:")}
633
- ${logo3(helper.commandUsage(cmd))}
634
-
635
- ${logoSmallGradient("Description:")}
636
- ${darkGrey(
637
- "Create new AristoByteUI projects or manage existing projects with full control"
638
- )}
639
- ${darkGrey("over components, dependencies, and UI stack configuration. Supports initialization,")}
640
- ${darkGrey(
641
- "addition, removal, upgrading of components, and project diagnostics."
642
- )}
643
-
644
- ${logoSmallGradient("Commands:")}
645
- ${helper.visibleCommands(cmd).map(
646
- (c) => ` ${`${logo3(c.name()).padEnd(31)} ${c.usage() || "".padEnd(30)}`.padEnd(129)} ${description(c.description())}`
647
- ).join("\n")}
648
-
649
- ${logoSmallGradient("Options:")}
650
- ${helper.visibleOptions(cmd).map((option) => {
651
- const flagsArray = option.flags.split(/,\s*/);
652
- const styledFlags = `${logo3(flagsArray[0])}${darkGrey(", ")}${logo4(flagsArray[1])}`;
653
- return ` ${styledFlags.padEnd(93)} ${description(option.description)}`;
654
- }).join("\n")}
655
-
656
- ${logoSmallGradient("Tip:")}
657
- ${lightGrey("Use 'aristobyte-ui [ command ] --help' for detailed info on a command.")}
658
- `
659
- });
660
1196
  aristobyteui.exitOverride(async (err) => {
661
1197
  if (err.code === "commander.unknownCommand") {
662
1198
  console.error(
@@ -678,8 +1214,8 @@ aristobyteui.exitOverride(async (err) => {
678
1214
  }
679
1215
  try {
680
1216
  await aristobyteui.parseAsync(args, { from: "user" });
681
- process.exit(1);
682
- } catch {
1217
+ } catch (err) {
1218
+ console.error(darkGrey("Error:"), lightGrey(err.message));
683
1219
  process.exit(1);
684
1220
  }
685
1221
  })();