mcp-gov 1.2.3 → 1.2.5

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 +34 -18
  2. package/package.json +1 -1
package/bin/mcp-gov.js CHANGED
@@ -82,17 +82,25 @@ 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
+ let path;
86
+ while (true) {
87
+ const configPath = await ask('Enter config path (e.g. ~/.claude.json): ');
88
+ const input = configPath.trim();
89
+
90
+ if (!input) {
91
+ console.log('Path required. Please try again.\n');
92
+ continue;
93
+ }
94
+
95
+ path = input.startsWith('~') ? input.replace('~', homedir()) : input;
91
96
 
92
- if (!existsSync(path)) {
93
- console.error(`\nError: Config file not found: ${path}`);
94
- process.exit(1);
97
+ if (existsSync(path)) {
98
+ break;
99
+ }
100
+ console.log(`\nFile not found: ${path}`);
101
+ console.log('Please try again.\n');
95
102
  }
103
+ rl.close();
96
104
 
97
105
  console.log(`\nWrapping servers...\n`);
98
106
 
@@ -106,17 +114,25 @@ async function handleWrap() {
106
114
  }
107
115
 
108
116
  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();
117
+ let path;
118
+ while (true) {
119
+ const configPath = await ask('Enter config path (e.g. ~/.claude.json): ');
120
+ const input = configPath.trim();
121
+
122
+ if (!input) {
123
+ console.log('Path required. Please try again.\n');
124
+ continue;
125
+ }
126
+
127
+ path = input.startsWith('~') ? input.replace('~', homedir()) : input;
115
128
 
116
- if (!existsSync(path)) {
117
- console.error(`\nError: Config file not found: ${path}`);
118
- process.exit(1);
129
+ if (existsSync(path)) {
130
+ break;
131
+ }
132
+ console.log(`\nFile not found: ${path}`);
133
+ console.log('Please try again.\n');
119
134
  }
135
+ rl.close();
120
136
 
121
137
  console.log(`\nUnwrapping servers...\n`);
122
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-gov",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
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",