codemaxxing 0.1.5 → 0.1.7

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/dist/auth-cli.js CHANGED
@@ -259,10 +259,8 @@ Examples:
259
259
  process.exit(1);
260
260
  }
261
261
  }
262
- // Run main if this is the main module
263
- if (typeof require !== "undefined" && require.main === module) {
264
- main().catch((err) => {
265
- console.error(`Error: ${err.message}`);
266
- process.exit(1);
267
- });
268
- }
262
+ // Always run main this module is either imported and main() called, or run directly
263
+ main().catch((err) => {
264
+ console.error(`Error: ${err.message}`);
265
+ process.exit(1);
266
+ });
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ const __filename = fileURLToPath(import.meta.url);
10
10
  const __dirname = dirname(__filename);
11
11
  const subcmd = process.argv[2];
12
12
  if (subcmd === "login" || subcmd === "auth") {
13
- // Route to auth CLI
13
+ // Route to auth CLI (spawn is fine here — no TUI/raw mode needed)
14
14
  const authScript = join(__dirname, "auth-cli.js");
15
15
  const args = subcmd === "login"
16
16
  ? [authScript, "login", ...process.argv.slice(3)]
@@ -22,11 +22,6 @@ if (subcmd === "login" || subcmd === "auth") {
22
22
  child.on("exit", (code) => process.exit(code ?? 0));
23
23
  }
24
24
  else {
25
- // Route to TUI
26
- const tuiScript = join(__dirname, "index.js");
27
- const child = spawn(process.execPath, [tuiScript, ...process.argv.slice(2)], {
28
- stdio: "inherit",
29
- cwd: process.cwd(),
30
- });
31
- child.on("exit", (code) => process.exit(code ?? 0));
25
+ // TUI mode — import directly (not spawn) to preserve raw stdin
26
+ await import("./index.js");
32
27
  }
package/dist/index.js CHANGED
@@ -30,7 +30,6 @@ function formatTimeAgo(date) {
30
30
  const SLASH_COMMANDS = [
31
31
  { cmd: "/help", desc: "show commands" },
32
32
  { cmd: "/login", desc: "set up authentication" },
33
- { cmd: "/login", desc: "set up authentication" },
34
33
  { cmd: "/map", desc: "show repository map" },
35
34
  { cmd: "/reset", desc: "clear conversation" },
36
35
  { cmd: "/context", desc: "show message count" },
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "codemaxxing",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Open-source terminal coding agent. Connect any LLM. Max your code.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
- "codemaxxing": "./dist/cli.js",
8
- "codemaxxing-auth": "./dist/auth-cli.js"
7
+ "codemaxxing": "dist/cli.js",
8
+ "codemaxxing-auth": "dist/auth-cli.js"
9
9
  },
10
10
  "type": "module",
11
11
  "scripts": {
package/src/auth-cli.ts CHANGED
@@ -280,10 +280,8 @@ Examples:
280
280
  }
281
281
  }
282
282
 
283
- // Run main if this is the main module
284
- if (typeof require !== "undefined" && require.main === module) {
285
- main().catch((err) => {
286
- console.error(`Error: ${err.message}`);
287
- process.exit(1);
288
- });
289
- }
283
+ // Always run main this module is either imported and main() called, or run directly
284
+ main().catch((err) => {
285
+ console.error(`Error: ${err.message}`);
286
+ process.exit(1);
287
+ });
package/src/cli.ts CHANGED
@@ -15,7 +15,7 @@ const __dirname = dirname(__filename);
15
15
  const subcmd = process.argv[2];
16
16
 
17
17
  if (subcmd === "login" || subcmd === "auth") {
18
- // Route to auth CLI
18
+ // Route to auth CLI (spawn is fine here — no TUI/raw mode needed)
19
19
  const authScript = join(__dirname, "auth-cli.js");
20
20
  const args = subcmd === "login"
21
21
  ? [authScript, "login", ...process.argv.slice(3)]
@@ -28,12 +28,6 @@ if (subcmd === "login" || subcmd === "auth") {
28
28
 
29
29
  child.on("exit", (code) => process.exit(code ?? 0));
30
30
  } else {
31
- // Route to TUI
32
- const tuiScript = join(__dirname, "index.js");
33
- const child = spawn(process.execPath, [tuiScript, ...process.argv.slice(2)], {
34
- stdio: "inherit",
35
- cwd: process.cwd(),
36
- });
37
-
38
- child.on("exit", (code) => process.exit(code ?? 0));
31
+ // TUI mode — import directly (not spawn) to preserve raw stdin
32
+ await import("./index.js");
39
33
  }
package/src/index.tsx CHANGED
@@ -30,7 +30,6 @@ function formatTimeAgo(date: Date): string {
30
30
  const SLASH_COMMANDS = [
31
31
  { cmd: "/help", desc: "show commands" },
32
32
  { cmd: "/login", desc: "set up authentication" },
33
- { cmd: "/login", desc: "set up authentication" },
34
33
  { cmd: "/map", desc: "show repository map" },
35
34
  { cmd: "/reset", desc: "clear conversation" },
36
35
  { cmd: "/context", desc: "show message count" },