mcp-gov 1.2.3 → 1.2.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/mcp-gov.js +28 -18
  2. package/package.json +1 -1
package/bin/mcp-gov.js CHANGED
@@ -82,17 +82,22 @@ async function main() {
82
82
  }
83
83
 
84
84
  async function handleWrap() {
85
- const defaultPath = '~/.config/claude/config.json';
86
- const fullDefault = join(homedir(), '.config', 'claude', 'config.json');
87
- const configPath = await ask(`Enter config path [${defaultPath}]: `);
88
- const input = configPath.trim() || fullDefault;
89
- const path = input.startsWith('~') ? input.replace('~', homedir()) : input;
90
- rl.close();
85
+ const defaultPath = '~/.claude.json';
86
+ const fullDefault = join(homedir(), '.claude.json');
87
+
88
+ let path;
89
+ while (true) {
90
+ const configPath = await ask(`Enter config path [${defaultPath}]: `);
91
+ const input = configPath.trim() || fullDefault;
92
+ path = input.startsWith('~') ? input.replace('~', homedir()) : input;
91
93
 
92
- if (!existsSync(path)) {
93
- console.error(`\nError: Config file not found: ${path}`);
94
- process.exit(1);
94
+ if (existsSync(path)) {
95
+ break;
96
+ }
97
+ console.log(`\nFile not found: ${path}`);
98
+ console.log('Please try again.\n');
95
99
  }
100
+ rl.close();
96
101
 
97
102
  console.log(`\nWrapping servers...\n`);
98
103
 
@@ -106,17 +111,22 @@ async function handleWrap() {
106
111
  }
107
112
 
108
113
  async function handleUnwrap() {
109
- const defaultPath = '~/.config/claude/config.json';
110
- const fullDefault = join(homedir(), '.config', 'claude', 'config.json');
111
- const configPath = await ask(`Enter config path [${defaultPath}]: `);
112
- const input = configPath.trim() || fullDefault;
113
- const path = input.startsWith('~') ? input.replace('~', homedir()) : input;
114
- rl.close();
114
+ const defaultPath = '~/.claude.json';
115
+ const fullDefault = join(homedir(), '.claude.json');
116
+
117
+ let path;
118
+ while (true) {
119
+ const configPath = await ask(`Enter config path [${defaultPath}]: `);
120
+ const input = configPath.trim() || fullDefault;
121
+ path = input.startsWith('~') ? input.replace('~', homedir()) : input;
115
122
 
116
- if (!existsSync(path)) {
117
- console.error(`\nError: Config file not found: ${path}`);
118
- process.exit(1);
123
+ if (existsSync(path)) {
124
+ break;
125
+ }
126
+ console.log(`\nFile not found: ${path}`);
127
+ console.log('Please try again.\n');
119
128
  }
129
+ rl.close();
120
130
 
121
131
  console.log(`\nUnwrapping servers...\n`);
122
132
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-gov",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "MCP Governance System - Permission control and audit logging for Model Context Protocol servers",
5
5
  "type": "module",
6
6
  "main": "src/index.js",