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