deepminer-cli 0.1.16 → 0.1.18

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.
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepminer-cli",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "DeepMiner CLI - Command-line tool for DM system with cross-platform support, JWT authentication, and workspace management",
5
5
  "keywords": [
6
6
  "deepminer",
@@ -14,6 +14,7 @@ const homeDir = os.homedir();
14
14
  const completionDir = path.join(homeDir, '.zsh', 'completions');
15
15
  const completionFile = path.join(completionDir, '_dm-cli');
16
16
  const sourceFile = path.join(__dirname, '_dm-cli');
17
+ const zshrcFile = path.join(homeDir, '.zshrc');
17
18
 
18
19
  try {
19
20
  // Create completion directory if it doesn't exist
@@ -26,6 +27,19 @@ try {
26
27
  fs.copyFileSync(sourceFile, completionFile);
27
28
  fs.chmodSync(completionFile, 0o644);
28
29
  }
30
+
31
+ // Add fpath to .zshrc if not already there
32
+ if (fs.existsSync(zshrcFile)) {
33
+ const zshrcContent = fs.readFileSync(zshrcFile, 'utf8');
34
+ const fpathLine = "fpath=(~/.zsh/completions $fpath)";
35
+
36
+ // Check if fpath is already configured
37
+ if (!zshrcContent.includes('~/.zsh/completions')) {
38
+ // Append fpath and compinit configuration
39
+ const newConfig = `\n# dm-cli completion\n${fpathLine}\nautoload -Uz compinit && compinit\n`;
40
+ fs.appendFileSync(zshrcFile, newConfig);
41
+ }
42
+ }
29
43
  } catch (err) {
30
44
  // Silent fail - completion is optional
31
45
  }