@deneb-ui/cli 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/bin/index.js +32 -11
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **DENEB UI — Build beautiful interfaces, effortlessly.**
6
6
  > The premier visual-first React component ecosystem.
7
- > Created by **Chamika Gayashan & Induranga Kawishwara**.
7
+ > Proudly presented by **DENEB-UI Collaborate with FIVORA**.
8
8
 
9
9
  [![Framework: DENEB UI](https://img.shields.io/badge/Framework-DENEB_UI_v2.0-blue.svg)](https://github.com/chamikathereal)
10
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-teal.svg)](https://opensource.org/licenses/MIT)
package/bin/index.js CHANGED
@@ -36,6 +36,27 @@ function isForbiddenFile(filename) {
36
36
  );
37
37
  }
38
38
 
39
+ function stripAnsi(str) {
40
+ return str.replace(/\x1b\[[0-9;]*m/g, '');
41
+ }
42
+
43
+ function createBox(lines, width = 55) {
44
+ const cyan = '\x1b[36m';
45
+ const reset = '\x1b[0m';
46
+ const top = ` ${cyan}╔${'═'.repeat(width)}╗${reset}`;
47
+ const bottom = ` ${cyan}╚${'═'.repeat(width)}╝${reset}`;
48
+
49
+ const rows = lines.map((line) => {
50
+ const rawLen = stripAnsi(line).length;
51
+ const padTotal = Math.max(0, width - rawLen);
52
+ const padLeft = Math.floor(padTotal / 2);
53
+ const padRight = padTotal - padLeft;
54
+ return ` ${cyan}║${reset}${' '.repeat(padLeft)}${line}${' '.repeat(padRight)}${cyan}║${reset}`;
55
+ });
56
+
57
+ return [top, ...rows, bottom].join('\n');
58
+ }
59
+
39
60
  function packageCleanZip(sourceDir, outputPath) {
40
61
  let AdmZip;
41
62
  try {
@@ -340,10 +361,10 @@ function initProject(targetInput) {
340
361
  const targetDir = path.resolve(process.cwd(), targetInput || '.');
341
362
  const pkgPath = path.join(targetDir, 'package.json');
342
363
 
343
- console.log(`\n\x1b[36m╔═══════════════════════════════════════════════════════╗\x1b[0m`);
344
- console.log(`\x1b[36m║ \x1b[1mFIVORA TEMPLATE INITIALIZER\x1b[0m\x1b[36m ║\x1b[0m`);
345
- console.log(`\x1b[36m║ \x1b[90mConfigure existing Next.js app for Fivora\x1b[0m\x1b[36m ║\x1b[0m`);
346
- console.log(`\x1b[36m╚═══════════════════════════════════════════════════════╝\x1b[0m\n`);
364
+ console.log('\n' + createBox([
365
+ '\x1b[1m\x1b[37mFIVORA TEMPLATE INITIALIZER\x1b[0m',
366
+ '\x1b[90mConfigure existing Next.js app for Fivora\x1b[0m'
367
+ ], 55) + '\n');
347
368
 
348
369
  if (!fs.existsSync(pkgPath)) {
349
370
  console.error(`\x1b[31mError:\x1b[0m No package.json found in "${targetDir}".`);
@@ -526,9 +547,9 @@ function updateDependencies(cmdArgs = []) {
526
547
  process.exit(1);
527
548
  }
528
549
 
529
- console.log('\n\x1b[36m╔═══════════════════════════════════════════════════════╗\x1b[0m');
530
- console.log('\x1b[36m║ \x1b[1mFIVORA PACKAGE UPDATER\x1b[0m\x1b[36m ║\x1b[0m');
531
- console.log('\x1b[36m╚═══════════════════════════════════════════════════════╝\x1b[0m\n');
550
+ console.log('\n' + createBox([
551
+ '\x1b[1m\x1b[37mFIVORA PACKAGE UPDATER\x1b[0m'
552
+ ], 55) + '\n');
532
553
 
533
554
  const currentEditable = String(pkg.dependencies?.['@fivora/editable-components'] || pkg.devDependencies?.['@fivora/editable-components'] || '');
534
555
  const currentCli = String(pkg.dependencies?.['@fivora/cli'] || pkg.devDependencies?.['@fivora/cli'] || '');
@@ -727,9 +748,9 @@ function addComponent(componentName, targetDirInput) {
727
748
  };
728
749
 
729
750
  if (!componentName || componentName === 'list') {
730
- console.log('\n\x1b[36m╔═══════════════════════════════════════════════════════╗\x1b[0m');
731
- console.log('\x1b[36m║ \x1b[1mDENEB UI COMPONENT REGISTRY\x1b[0m\x1b[36m ║\x1b[0m');
732
- console.log('\x1b[36m╚═══════════════════════════════════════════════════════╝\x1b[0m\n');
751
+ console.log('\n' + createBox([
752
+ '\x1b[1m\x1b[37mDENEB UI COMPONENT REGISTRY\x1b[0m'
753
+ ], 55) + '\n');
733
754
  console.log('Available components to add (run "deneb add <name>"):');
734
755
  for (const [key, val] of Object.entries(REGISTRY)) {
735
756
  console.log(` - \x1b[32m${key.padEnd(18)}\x1b[0m -> src/components/ui/${val.file}`);
@@ -783,7 +804,7 @@ if (command === 'init') {
783
804
  process.exit(res.status ?? 0);
784
805
  } else {
785
806
  console.log(`Usage: deneb <command> [options] (or fivora <command> [options])
786
- DENEB UI Framework — Created by Chamika Gayashan & Induranga Kawishwara
807
+ DENEB UI Framework — Powered by DENEB-UI Collaborate with FIVORA
787
808
 
788
809
  Commands:
789
810
  add Add a DENEB UI component to src/components/ui/ (e.g. deneb add product-card)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deneb-ui/cli",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "Official developer CLI for DENEB UI — Validating, scaffolding, testing, and packaging storefront templates. Created by Chamika Gayashan & Induranga Kawishwara.",
5
5
  "bin": {
6
6
  "deneb": "bin/index.js",