@srcroot/ui 0.0.13 → 0.0.14

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/dist/index.js +15 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -578,13 +578,22 @@ async function init(options) {
578
578
  spinner.text = `Installing dependencies via ${packageManager}: ${missing.join(", ")}...`;
579
579
  try {
580
580
  const { execSync } = await import("child_process");
581
- execSync(`${packageManager} ${installCmd} ${missing.join(" ")}`, { stdio: "ignore", cwd });
581
+ execSync(`${packageManager} ${installCmd} ${missing.join(" ")}`, {
582
+ stdio: "pipe",
583
+ cwd
584
+ });
582
585
  spinner.succeed("Dependencies installed");
583
- } catch {
586
+ } catch (error) {
584
587
  spinner.fail("Failed to install dependencies automatically");
585
- console.log(chalk.dim(`
586
- Please manually run: ${packageManager} ${installCmd} ${missing.join(" ")}
587
- `));
588
+ if (error.stdout) {
589
+ console.log(chalk.dim("\\n=== stdout ==="));
590
+ console.log(chalk.dim(error.stdout.toString()));
591
+ }
592
+ if (error.stderr) {
593
+ console.log(chalk.red("\\n=== stderr ==="));
594
+ console.error(chalk.red(error.stderr.toString()));
595
+ }
596
+ console.log(chalk.dim(`\\nPlease manually run: ${packageManager} ${installCmd} ${missing.join(" ")}\\n`));
588
597
  }
589
598
  } else {
590
599
  spinner.succeed("All dependencies already installed");
@@ -1035,7 +1044,7 @@ async function add(components, options) {
1035
1044
  spinner.info(`${chalk2.cyan(comp.file)} already exists, skipping (use --overwrite to replace)`);
1036
1045
  continue;
1037
1046
  }
1038
- const registryPath = path2.resolve(__dirname3, "..", "..", "..", "registry", comp.file);
1047
+ const registryPath = path2.resolve(__dirname3, "..", "registry", comp.file);
1039
1048
  if (!fs2.existsSync(registryPath)) {
1040
1049
  spinner.warn(`Registry file not found for ${name}: ${registryPath}`);
1041
1050
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srcroot/ui",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "A shadcn-style CLI UI library with polymorphic, accessible React components",
5
5
  "type": "module",
6
6
  "bin": {