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.
- package/bin/mcp-gov.js +28 -18
- 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 = '~/.
|
|
86
|
-
const fullDefault = join(homedir(), '.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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 = '~/.
|
|
110
|
-
const fullDefault = join(homedir(), '.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
|