tthr 0.0.55 → 0.0.56

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 +23 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1987,15 +1987,22 @@ var TETHER_PACKAGES = [
1987
1987
  "@tthr/schema"
1988
1988
  ];
1989
1989
  function detectPackageManager() {
1990
- const cwd = process.cwd();
1991
- if (fs4.existsSync(path4.join(cwd, "bun.lockb")) || fs4.existsSync(path4.join(cwd, "bun.lock"))) {
1992
- return "bun";
1993
- }
1994
- if (fs4.existsSync(path4.join(cwd, "pnpm-lock.yaml"))) {
1995
- return "pnpm";
1996
- }
1997
- if (fs4.existsSync(path4.join(cwd, "yarn.lock"))) {
1998
- return "yarn";
1990
+ let dir = process.cwd();
1991
+ const root = path4.parse(dir).root;
1992
+ while (dir !== root) {
1993
+ if (fs4.existsSync(path4.join(dir, "bun.lockb")) || fs4.existsSync(path4.join(dir, "bun.lock"))) {
1994
+ return "bun";
1995
+ }
1996
+ if (fs4.existsSync(path4.join(dir, "pnpm-lock.yaml"))) {
1997
+ return "pnpm";
1998
+ }
1999
+ if (fs4.existsSync(path4.join(dir, "yarn.lock"))) {
2000
+ return "yarn";
2001
+ }
2002
+ if (fs4.existsSync(path4.join(dir, "package-lock.json"))) {
2003
+ return "npm";
2004
+ }
2005
+ dir = path4.dirname(dir);
1999
2006
  }
2000
2007
  return "npm";
2001
2008
  }
@@ -2093,11 +2100,11 @@ async function updateCommand(options) {
2093
2100
  try {
2094
2101
  if (depsToUpdate.length > 0) {
2095
2102
  const cmd = getInstallCommand2(pm, depsToUpdate, false);
2096
- execSync2(cmd, { stdio: "pipe", cwd: process.cwd() });
2103
+ execSync2(cmd, { stdio: "inherit", cwd: process.cwd() });
2097
2104
  }
2098
2105
  if (devDepsToUpdate.length > 0) {
2099
2106
  const cmd = getInstallCommand2(pm, devDepsToUpdate, true);
2100
- execSync2(cmd, { stdio: "pipe", cwd: process.cwd() });
2107
+ execSync2(cmd, { stdio: "inherit", cwd: process.cwd() });
2101
2108
  }
2102
2109
  updateSpinner.succeed("Packages updated successfully");
2103
2110
  console.log(chalk5.green(`
@@ -2105,7 +2112,11 @@ async function updateCommand(options) {
2105
2112
  `));
2106
2113
  } catch (error) {
2107
2114
  updateSpinner.fail("Failed to update packages");
2108
- console.error(chalk5.red(error instanceof Error ? error.message : "Unknown error"));
2115
+ if (error instanceof Error && "stderr" in error) {
2116
+ console.error(chalk5.red(error.stderr?.toString() || error.message));
2117
+ } else {
2118
+ console.error(chalk5.red(error instanceof Error ? error.message : "Unknown error"));
2119
+ }
2109
2120
  process.exit(1);
2110
2121
  }
2111
2122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tthr",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "description": "Tether CLI - project scaffolding and deployment",
5
5
  "type": "module",
6
6
  "bin": {