komplian 0.3.0 → 0.3.2

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.
@@ -128,9 +128,13 @@ function logGhIdentity() {
128
128
  }
129
129
  }
130
130
 
131
+ function cmdExists(name) {
132
+ const r = spawnSync(name, ["--version"], { stdio: "ignore" });
133
+ return !r.error;
134
+ }
135
+
131
136
  function needCmd(name, hint = "") {
132
- const r = spawnSync("command", ["-v", name], { shell: true, stdio: "ignore" });
133
- if (r.status !== 0) {
137
+ if (!cmdExists(name)) {
134
138
  log(`${c.red}✗${c.reset} Falta ${c.bold}${name}${c.reset} en el PATH.${hint ? ` ${hint}` : ""}`);
135
139
  process.exit(1);
136
140
  }
@@ -269,8 +273,7 @@ function copyCursorPack(workspace, cursorRepoUrl) {
269
273
  function npmInstallEach(workspace) {
270
274
  log("");
271
275
  log(`${c.cyan}━━ npm install por repo ━━${c.reset}`);
272
- const r = spawnSync("command", ["-v", "npm"], { shell: true, stdio: "ignore" });
273
- if (r.status !== 0) {
276
+ if (!cmdExists("npm")) {
274
277
  log(`${c.yellow}○${c.reset} npm no está en PATH — omito installs`);
275
278
  return;
276
279
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "komplian",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Komplian developer workspace setup: GitHub CLI (browser login) + git clone by team. Node 18+, git, gh — no OAuth App to register.",
5
5
  "type": "module",
6
6
  "engines": {