artharexian-ui 0.3.3 → 0.3.4

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/cli/index.mjs +11 -7
  2. package/package.json +1 -4
package/cli/index.mjs CHANGED
@@ -19,15 +19,19 @@ function readRegistry() {
19
19
  console.error('Registry not found')
20
20
  process.exit(1)
21
21
  }
22
- return JSON.parse(fs.readFileSync(REGISTRY_JSON, 'utf8'))
23
- }
24
-
25
- function ensureVueProject() {
26
- // Optional: could check for package.json or vue dependency
27
- // For now, just ensure cwd is writable
22
+ try {
23
+ return JSON.parse(fs.readFileSync(REGISTRY_JSON, 'utf8'))
24
+ } catch {
25
+ console.error('Invalid registry.json')
26
+ process.exit(1)
27
+ }
28
28
  }
29
29
 
30
30
  function copyFileSafe(src, dest) {
31
+ if (!fs.existsSync(src)) {
32
+ console.error(`Missing file in registry: ${path.basename(src)}`)
33
+ process.exit(1)
34
+ }
31
35
  if (fs.existsSync(dest)) {
32
36
  const rel = path.relative(cwd, dest)
33
37
  console.log(`skip ${rel} (exists)`)
@@ -59,7 +63,7 @@ function addComponent(name) {
59
63
  process.exit(1)
60
64
  }
61
65
 
62
- // Auto-install styles if not present
66
+ // Auto-install registry styles if not present
63
67
  const stylesPath = path.join(cwd, 'src', 'styles')
64
68
  const registryStyles = path.join(REGISTRY_DIR, 'styles')
65
69
  if (!fs.existsSync(stylesPath) && fs.existsSync(registryStyles)) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "artharexian-ui",
3
3
  "description": "Vue 3 UI component library",
4
- "version": "0.3.3",
4
+ "version": "0.3.4",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "type": "module",
@@ -20,9 +20,6 @@
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
23
- "exports": {
24
- "./styles": "./src/styles/style.css"
25
- },
26
23
  "scripts": {
27
24
  "dev": "vite",
28
25
  "format": "prettier --write .",