purvex-ui 1.0.2 → 1.0.3

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "purvex-ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "React component generator with Tailwind CSS v4 & Purple Elegant theme",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  const { Command } = require('commander');
4
4
  const chalk = require('chalk');
5
- const boxen = require('boxen');
5
+ // Import boxen yang benar
6
+ const boxen = require('boxen').default;
6
7
  const { readFileSync } = require('fs');
7
8
  const { join } = require('path');
8
9
 
@@ -61,22 +62,9 @@ program
61
62
  const path = require('path');
62
63
 
63
64
  try {
64
- // Coba beberapa path untuk registry
65
- const possiblePaths = [
66
- path.join(__dirname, '..', 'registry', 'components.json'),
67
- path.join(__dirname, 'registry', 'components.json'),
68
- path.join(process.cwd(), 'node_modules', 'purvex-ui', 'registry', 'components.json')
69
- ];
65
+ const registryPath = path.join(__dirname, '..', 'registry', 'components.json');
70
66
 
71
- let registryPath = null;
72
- for (const p of possiblePaths) {
73
- if (fs.existsSync(p)) {
74
- registryPath = p;
75
- break;
76
- }
77
- }
78
-
79
- if (!registryPath) {
67
+ if (!fs.existsSync(registryPath)) {
80
68
  console.log(chalk.red('❌ Registry tidak ditemukan'));
81
69
  console.log(chalk.yellow('\nKomponen yang tersedia:'));
82
70
  console.log(chalk.cyan(' • button'));
@@ -96,11 +84,6 @@ program
96
84
 
97
85
  } catch (error) {
98
86
  console.error(chalk.red('❌ Error:'), error.message);
99
- // Fallback
100
- console.log(chalk.blue.bold('\n📦 Komponen (fallback):\n'));
101
- console.log(chalk.cyan(' • button'));
102
- console.log(chalk.cyan(' • card'));
103
- console.log(chalk.cyan(' • avatar'));
104
87
  }
105
88
  });
106
89