@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 +14 -7
- package/cli/update.ts +13 -6
- package/dist/cli/install.js +16 -8
- package/dist/cli/update.js +15 -7
- package/package.json +1 -1
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
|
|
37
|
+
// Check runtime (bun preferred, node works too)
|
|
38
38
|
try {
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
45
|
-
|
|
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
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
51
|
-
|
|
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 {
|
package/dist/cli/install.js
CHANGED
|
@@ -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
|
|
14
|
+
// Check runtime (bun preferred, node works too)
|
|
15
15
|
try {
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
24
|
-
|
|
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 {
|
package/dist/cli/update.js
CHANGED
|
@@ -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
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
28
|
-
|
|
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);
|