komplian 0.3.0 → 0.3.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.
@@ -128,9 +128,17 @@ function logGhIdentity() {
128
128
  }
129
129
  }
130
130
 
131
+ const isWin = process.platform === "win32";
132
+
133
+ function cmdExists(name) {
134
+ const r = isWin
135
+ ? spawnSync("where", [name], { stdio: "ignore" })
136
+ : spawnSync("command", ["-v", name], { shell: true, stdio: "ignore" });
137
+ return r.status === 0;
138
+ }
139
+
131
140
  function needCmd(name, hint = "") {
132
- const r = spawnSync("command", ["-v", name], { shell: true, stdio: "ignore" });
133
- if (r.status !== 0) {
141
+ if (!cmdExists(name)) {
134
142
  log(`${c.red}✗${c.reset} Falta ${c.bold}${name}${c.reset} en el PATH.${hint ? ` ${hint}` : ""}`);
135
143
  process.exit(1);
136
144
  }
@@ -269,8 +277,7 @@ function copyCursorPack(workspace, cursorRepoUrl) {
269
277
  function npmInstallEach(workspace) {
270
278
  log("");
271
279
  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) {
280
+ if (!cmdExists("npm")) {
274
281
  log(`${c.yellow}○${c.reset} npm no está en PATH — omito installs`);
275
282
  return;
276
283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "komplian",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
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": {