ssh-mcp 2.0.1 → 2.0.2
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/README.md +2 -0
- package/build/config/loader.js +10 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/ssh-mcp)
|
|
4
4
|
[](https://www.npmjs.com/package/ssh-mcp)
|
|
5
|
+
[](https://github.com/tufantunc/ssh-mcp/actions/workflows/ci.yml)
|
|
6
|
+
[](https://codecov.io/gh/tufantunc/ssh-mcp)
|
|
5
7
|
[](./LICENSE)
|
|
6
8
|
[](https://github.com/tufantunc/ssh-mcp/issues)
|
|
7
9
|
|
package/build/config/loader.js
CHANGED
|
@@ -91,6 +91,16 @@ function normalizeConfig(raw) {
|
|
|
91
91
|
export function getProfile(config, name) {
|
|
92
92
|
const targetName = name || config.defaults.defaultProfile;
|
|
93
93
|
if (!targetName) {
|
|
94
|
+
// Falling back to profiles[0] meant that with several hosts configured and
|
|
95
|
+
// no default chosen, a command with no profile argument ran against
|
|
96
|
+
// whichever host happened to be listed first — silently, and typically the
|
|
97
|
+
// one written down first, which tends to be production. One profile is
|
|
98
|
+
// unambiguous; more than one is a question the caller has to answer.
|
|
99
|
+
if (config.profiles.length > 1) {
|
|
100
|
+
const names = config.profiles.map((p) => p.name).join(', ');
|
|
101
|
+
throw new Error(`No profile selected and no default configured, but ${config.profiles.length} profiles exist: ${names}. ` +
|
|
102
|
+
`Pass a "profile" argument, or set defaults.defaultProfile in the config.`);
|
|
103
|
+
}
|
|
94
104
|
return config.profiles[0];
|
|
95
105
|
}
|
|
96
106
|
const profile = config.profiles.find((p) => p.name === targetName);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ssh-mcp",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "MCP server exposing policy-gated, audited SSH access for Linux and Windows hosts via the Model Context Protocol.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@changesets/cli": "^2.31.0",
|
|
44
44
|
"@types/node": "^24.5.2",
|
|
45
45
|
"@types/ssh2": "^1.15.5",
|
|
46
|
+
"@vitest/coverage-v8": "^3.2.7",
|
|
46
47
|
"cross-env": "^7.0.3",
|
|
47
48
|
"fast-check": "^3.23.2",
|
|
48
49
|
"shx": "^0.4.0",
|