@locusai/cli 0.4.2 → 0.4.4

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.
Files changed (2) hide show
  1. package/bin/locus.js +23 -3
  2. package/package.json +2 -2
package/bin/locus.js CHANGED
@@ -17643,10 +17643,28 @@ class CodebaseIndexer {
17643
17643
  }
17644
17644
  if (onProgress)
17645
17645
  onProgress("Generating file tree...");
17646
+ const gitmodulesPath = join3(this.projectPath, ".gitmodules");
17647
+ const submoduleIgnores = [];
17648
+ if (existsSync2(gitmodulesPath)) {
17649
+ try {
17650
+ const content = readFileSync2(gitmodulesPath, "utf-8");
17651
+ const lines = content.split(`
17652
+ `);
17653
+ for (const line of lines) {
17654
+ const match = line.match(/^\s*path\s*=\s*(.*)$/);
17655
+ const path2 = match?.[1]?.trim();
17656
+ if (path2) {
17657
+ submoduleIgnores.push(`${path2}/**`);
17658
+ submoduleIgnores.push(`**/${path2}/**`);
17659
+ }
17660
+ }
17661
+ } catch {}
17662
+ }
17646
17663
  const files = await globby(["**/*"], {
17647
17664
  cwd: this.projectPath,
17648
17665
  gitignore: true,
17649
17666
  ignore: [
17667
+ ...submoduleIgnores,
17650
17668
  "**/node_modules/**",
17651
17669
  "**/dist/**",
17652
17670
  "**/build/**",
@@ -21931,7 +21949,9 @@ class ClaudeRunner {
21931
21949
  ];
21932
21950
  const claude = spawn("claude", args, {
21933
21951
  cwd: this.projectPath,
21934
- stdio: ["pipe", "pipe", "pipe"]
21952
+ stdio: ["pipe", "pipe", "pipe"],
21953
+ env: process.env,
21954
+ shell: true
21935
21955
  });
21936
21956
  let output = "";
21937
21957
  let errorOutput = "";
@@ -21943,13 +21963,13 @@ class ClaudeRunner {
21943
21963
  errorOutput += data.toString();
21944
21964
  process.stderr.write(data.toString());
21945
21965
  });
21946
- claude.on("error", (err) => reject(new Error(`Failed to start Claude CLI: ${err.message}`)));
21966
+ claude.on("error", (err) => reject(new Error(`Failed to start Claude CLI (shell: true): ${err.message}. Please ensure the 'claude' command is available in your PATH.`)));
21947
21967
  claude.on("close", (code) => {
21948
21968
  if (code === 0)
21949
21969
  resolve(output);
21950
21970
  else {
21951
21971
  const detail = errorOutput.trim();
21952
- const message = detail ? `Claude CLI error: ${detail}` : `Claude CLI exited with code ${code}. Please ensure the Claude CLI is installed and you are logged in (run 'claude' manually to check).`;
21972
+ const message = detail ? `Claude CLI error (exit code ${code}): ${detail}` : `Claude CLI exited with code ${code}. Please ensure the Claude CLI is installed and you are logged in (run 'claude' manually to check).`;
21953
21973
  reject(new Error(message));
21954
21974
  }
21955
21975
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locusai/cli",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Local-first AI development platform & engineering workspace",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,7 +31,7 @@
31
31
  "author": "",
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
- "@locusai/sdk": "^0.4.2"
34
+ "@locusai/sdk": "^0.4.4"
35
35
  },
36
36
  "devDependencies": {}
37
37
  }