@alea-design/cli 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -8,4 +8,6 @@ npx @alea-design/cli add button select dialog
8
8
  ALEA_LICENSE_KEY=... npx @alea-design/cli add data-grid # Alea Pro
9
9
  ```
10
10
 
11
+ `init` installs the peers the components need, pinned to the ranges `@alea-design/ui` depends on (`react-aria-components`, `lucide-react@^0.525.0`, `@alea-design/motion`); with `--no-install` it prints the command instead. The copied components type-check with React 18 and React 19 types.
12
+
11
13
  Docs: https://alea.alevasquez.dev/installation · MIT license
package/bin/alea.mjs CHANGED
@@ -36,7 +36,8 @@ function install(pkgs) {
36
36
  try { const pj = JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), 'utf8')); have = { ...pj.dependencies, ...pj.devDependencies }; } catch { /* no package.json */ }
37
37
  const missing = [...new Set(pkgs)].filter(p => !have[p]);
38
38
  if (!missing.length) return;
39
- const cmdline = `${packageManager()} ${missing.join(' ')}`;
39
+ // pinned to the ranges @alea-design/ui depends on (a plain install of lucide-react would pull a newer major)
40
+ const cmdline = `${packageManager()} ${missing.map(p => registry.peers?.[p] ? `${p}@${registry.peers[p]}` : p).join(' ')}`;
40
41
  if (flag('no-install')) { say(`→ also install: ${cmdline}`); return; }
41
42
  say(`→ ${cmdline}`);
42
43
  try { execSync(cmdline, { cwd, stdio: 'inherit' }); } catch { die(`could not install; run it yourself: ${cmdline}`); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alea-design/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Copy Alea components into your project: alea init, add, list.",
5
5
  "keywords": [
6
6
  "cli",
@@ -42,5 +42,9 @@
42
42
  "lucide-react": "^0.525.0",
43
43
  "qrcode-generator": "^1.5.2",
44
44
  "react-aria-components": "^1.22.1"
45
+ },
46
+ "devDependencies": {
47
+ "@types/react-18": "npm:@types/react@^18.3.31",
48
+ "@types/react-dom-18": "npm:@types/react-dom@^18.3.7"
45
49
  }
46
50
  }