@umang-boss/claudemon 1.1.1 → 1.1.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.
package/cli/install.ts CHANGED
@@ -34,15 +34,22 @@ import {
34
34
  async function checkPrerequisites(): Promise<boolean> {
35
35
  let allGood = true;
36
36
 
37
- // Check bun (sanity)
37
+ // Check runtime (bun preferred, node works too)
38
38
  try {
39
- const result = spawnSync("bun", ["--version"], { stdio: "pipe" });
40
- if (result.error) throw result.error;
41
- const output = result.stdout?.toString().trim();
42
- ok(`Bun runtime: v${output}`);
39
+ const bunResult = spawnSync("bun", ["--version"], { stdio: "pipe" });
40
+ if (!bunResult.error) {
41
+ ok(`Bun runtime: v${bunResult.stdout?.toString().trim()} (fast mode)`);
42
+ } else {
43
+ throw new Error("no bun");
44
+ }
43
45
  } catch {
44
- fail("Bun runtime not found. Install from https://bun.sh");
45
- allGood = false;
46
+ const nodeResult = spawnSync("node", ["--version"], { stdio: "pipe" });
47
+ if (!nodeResult.error) {
48
+ ok(`Node.js runtime: ${nodeResult.stdout?.toString().trim()}`);
49
+ } else {
50
+ fail("No runtime found. Install Node.js 18+ from https://nodejs.org");
51
+ allGood = false;
52
+ }
46
53
  }
47
54
 
48
55
  // Check Claude Code directory
package/cli/update.ts CHANGED
@@ -42,13 +42,20 @@ async function checkPrerequisites(): Promise<boolean> {
42
42
  let allGood = true;
43
43
 
44
44
  try {
45
- const result = spawnSync("bun", ["--version"], { stdio: "pipe" });
46
- if (result.error) throw result.error;
47
- const output = result.stdout?.toString().trim();
48
- ok(`Bun runtime: v${output}`);
45
+ const bunResult = spawnSync("bun", ["--version"], { stdio: "pipe" });
46
+ if (!bunResult.error) {
47
+ ok(`Bun runtime: v${bunResult.stdout?.toString().trim()} (fast mode)`);
48
+ } else {
49
+ throw new Error("no bun");
50
+ }
49
51
  } catch {
50
- fail("Bun runtime not found.");
51
- allGood = false;
52
+ const nodeResult = spawnSync("node", ["--version"], { stdio: "pipe" });
53
+ if (!nodeResult.error) {
54
+ ok(`Node.js runtime: ${nodeResult.stdout?.toString().trim()}`);
55
+ } else {
56
+ fail("No runtime found. Install Node.js 18+");
57
+ allGood = false;
58
+ }
52
59
  }
53
60
 
54
61
  try {
@@ -11,17 +11,25 @@ import { ok, fail, readJson, writeJson, CLAUDE_DIR, CLAUDE_CONFIG, CLAUDE_SETTIN
11
11
  // ── Step 1: Check Prerequisites ──────────────────────────────
12
12
  async function checkPrerequisites() {
13
13
  let allGood = true;
14
- // Check bun (sanity)
14
+ // Check runtime (bun preferred, node works too)
15
15
  try {
16
- const result = spawnSync("bun", ["--version"], { stdio: "pipe" });
17
- if (result.error)
18
- throw result.error;
19
- const output = result.stdout?.toString().trim();
20
- ok(`Bun runtime: v${output}`);
16
+ const bunResult = spawnSync("bun", ["--version"], { stdio: "pipe" });
17
+ if (!bunResult.error) {
18
+ ok(`Bun runtime: v${bunResult.stdout?.toString().trim()} (fast mode)`);
19
+ }
20
+ else {
21
+ throw new Error("no bun");
22
+ }
21
23
  }
22
24
  catch {
23
- fail("Bun runtime not found. Install from https://bun.sh");
24
- allGood = false;
25
+ const nodeResult = spawnSync("node", ["--version"], { stdio: "pipe" });
26
+ if (!nodeResult.error) {
27
+ ok(`Node.js runtime: ${nodeResult.stdout?.toString().trim()}`);
28
+ }
29
+ else {
30
+ fail("No runtime found. Install Node.js 18+ from https://nodejs.org");
31
+ allGood = false;
32
+ }
25
33
  }
26
34
  // Check Claude Code directory
27
35
  try {
@@ -17,15 +17,23 @@ import { ok, fail, info, readJson, writeJson, CLAUDE_DIR, CLAUDE_CONFIG, CLAUDE_
17
17
  async function checkPrerequisites() {
18
18
  let allGood = true;
19
19
  try {
20
- const result = spawnSync("bun", ["--version"], { stdio: "pipe" });
21
- if (result.error)
22
- throw result.error;
23
- const output = result.stdout?.toString().trim();
24
- ok(`Bun runtime: v${output}`);
20
+ const bunResult = spawnSync("bun", ["--version"], { stdio: "pipe" });
21
+ if (!bunResult.error) {
22
+ ok(`Bun runtime: v${bunResult.stdout?.toString().trim()} (fast mode)`);
23
+ }
24
+ else {
25
+ throw new Error("no bun");
26
+ }
25
27
  }
26
28
  catch {
27
- fail("Bun runtime not found.");
28
- allGood = false;
29
+ const nodeResult = spawnSync("node", ["--version"], { stdio: "pipe" });
30
+ if (!nodeResult.error) {
31
+ ok(`Node.js runtime: ${nodeResult.stdout?.toString().trim()}`);
32
+ }
33
+ else {
34
+ fail("No runtime found. Install Node.js 18+");
35
+ allGood = false;
36
+ }
29
37
  }
30
38
  try {
31
39
  await access(CLAUDE_DIR, fsConstants.F_OK);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umang-boss/claudemon",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Pokemon Gen 1 coding companion for Claude Code — Gotta code 'em all!",
5
5
  "type": "module",
6
6
  "main": "dist/src/server/index.js",