@hasna/mcps 0.0.24 → 0.0.26
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/index.js +27 -7
- package/bin/mcp.js +16 -4
- package/dist/index.js +5 -1
- package/dist/mcp/index.js +16 -4
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -12816,8 +12816,12 @@ function updateServer(id, updates) {
|
|
|
12816
12816
|
values.push(updates.description);
|
|
12817
12817
|
}
|
|
12818
12818
|
if (updates.command !== undefined) {
|
|
12819
|
+
const command = normalizeCandidate(updates.command);
|
|
12820
|
+
if (!command) {
|
|
12821
|
+
throw new Error("Command is required");
|
|
12822
|
+
}
|
|
12819
12823
|
sets.push("command = ?");
|
|
12820
|
-
values.push(
|
|
12824
|
+
values.push(command);
|
|
12821
12825
|
}
|
|
12822
12826
|
if (updates.args !== undefined) {
|
|
12823
12827
|
sets.push("args = ?");
|
|
@@ -36446,7 +36450,7 @@ var init_provider_profiles = __esm(() => {
|
|
|
36446
36450
|
var require_package = __commonJS((exports, module) => {
|
|
36447
36451
|
module.exports = {
|
|
36448
36452
|
name: "@hasna/mcps",
|
|
36449
|
-
version: "0.0.
|
|
36453
|
+
version: "0.0.26",
|
|
36450
36454
|
description: "Meta-MCP registry & CLI \u2014 discover, manage, and proxy MCP servers",
|
|
36451
36455
|
type: "module",
|
|
36452
36456
|
repository: {
|
|
@@ -41303,8 +41307,12 @@ function isStdioMode(args = process.argv.slice(2)) {
|
|
|
41303
41307
|
function resolveHttpPort(args = process.argv.slice(2)) {
|
|
41304
41308
|
for (let i = 0;i < args.length; i++) {
|
|
41305
41309
|
const arg = args[i];
|
|
41306
|
-
if (arg === "--port"
|
|
41307
|
-
|
|
41310
|
+
if (arg === "--port") {
|
|
41311
|
+
const value = args[i + 1];
|
|
41312
|
+
if (value === undefined || value === "" || value.startsWith("--")) {
|
|
41313
|
+
throw new Error("Missing value for --port");
|
|
41314
|
+
}
|
|
41315
|
+
return parsePort(value);
|
|
41308
41316
|
}
|
|
41309
41317
|
if (arg.startsWith("--port=")) {
|
|
41310
41318
|
return parsePort(arg.slice("--port=".length));
|
|
@@ -41317,7 +41325,11 @@ function resolveHttpPort(args = process.argv.slice(2)) {
|
|
|
41317
41325
|
return DEFAULT_HTTP_PORT;
|
|
41318
41326
|
}
|
|
41319
41327
|
function parsePort(raw) {
|
|
41320
|
-
const
|
|
41328
|
+
const normalized = raw.trim();
|
|
41329
|
+
if (!/^\d+$/.test(normalized)) {
|
|
41330
|
+
throw new Error(`Invalid port: ${raw}`);
|
|
41331
|
+
}
|
|
41332
|
+
const port = Number(normalized);
|
|
41321
41333
|
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
41322
41334
|
throw new Error(`Invalid port: ${raw}`);
|
|
41323
41335
|
}
|
|
@@ -42504,8 +42516,16 @@ Dashboard not found at: ${dashboardDir}`);
|
|
|
42504
42516
|
fields.name = body.name;
|
|
42505
42517
|
if (body.description !== undefined)
|
|
42506
42518
|
fields.description = body.description;
|
|
42507
|
-
if (body.command !== undefined)
|
|
42508
|
-
|
|
42519
|
+
if (body.command !== undefined) {
|
|
42520
|
+
if (typeof body.command !== "string") {
|
|
42521
|
+
return json({ error: "Invalid 'command' format" }, 400, port);
|
|
42522
|
+
}
|
|
42523
|
+
const command = body.command.trim();
|
|
42524
|
+
if (!command) {
|
|
42525
|
+
return json({ error: "Command is required" }, 400, port);
|
|
42526
|
+
}
|
|
42527
|
+
fields.command = command;
|
|
42528
|
+
}
|
|
42509
42529
|
if (body.env !== undefined)
|
|
42510
42530
|
fields.env = body.env;
|
|
42511
42531
|
if (body.credential_refs !== undefined || body.credentialRefs !== undefined) {
|
package/bin/mcp.js
CHANGED
|
@@ -30832,8 +30832,12 @@ function updateServer(id, updates) {
|
|
|
30832
30832
|
values.push(updates.description);
|
|
30833
30833
|
}
|
|
30834
30834
|
if (updates.command !== undefined) {
|
|
30835
|
+
const command = normalizeCandidate(updates.command);
|
|
30836
|
+
if (!command) {
|
|
30837
|
+
throw new Error("Command is required");
|
|
30838
|
+
}
|
|
30835
30839
|
sets.push("command = ?");
|
|
30836
|
-
values.push(
|
|
30840
|
+
values.push(command);
|
|
30837
30841
|
}
|
|
30838
30842
|
if (updates.args !== undefined) {
|
|
30839
30843
|
sets.push("args = ?");
|
|
@@ -37682,8 +37686,12 @@ function isStdioMode(args = process.argv.slice(2)) {
|
|
|
37682
37686
|
function resolveHttpPort(args = process.argv.slice(2)) {
|
|
37683
37687
|
for (let i = 0;i < args.length; i++) {
|
|
37684
37688
|
const arg = args[i];
|
|
37685
|
-
if (arg === "--port"
|
|
37686
|
-
|
|
37689
|
+
if (arg === "--port") {
|
|
37690
|
+
const value = args[i + 1];
|
|
37691
|
+
if (value === undefined || value === "" || value.startsWith("--")) {
|
|
37692
|
+
throw new Error("Missing value for --port");
|
|
37693
|
+
}
|
|
37694
|
+
return parsePort(value);
|
|
37687
37695
|
}
|
|
37688
37696
|
if (arg.startsWith("--port=")) {
|
|
37689
37697
|
return parsePort(arg.slice("--port=".length));
|
|
@@ -37696,7 +37704,11 @@ function resolveHttpPort(args = process.argv.slice(2)) {
|
|
|
37696
37704
|
return DEFAULT_HTTP_PORT;
|
|
37697
37705
|
}
|
|
37698
37706
|
function parsePort(raw) {
|
|
37699
|
-
const
|
|
37707
|
+
const normalized = raw.trim();
|
|
37708
|
+
if (!/^\d+$/.test(normalized)) {
|
|
37709
|
+
throw new Error(`Invalid port: ${raw}`);
|
|
37710
|
+
}
|
|
37711
|
+
const port = Number(normalized);
|
|
37700
37712
|
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
37701
37713
|
throw new Error(`Invalid port: ${raw}`);
|
|
37702
37714
|
}
|
package/dist/index.js
CHANGED
|
@@ -17549,8 +17549,12 @@ function updateServer(id, updates) {
|
|
|
17549
17549
|
values.push(updates.description);
|
|
17550
17550
|
}
|
|
17551
17551
|
if (updates.command !== undefined) {
|
|
17552
|
+
const command = normalizeCandidate(updates.command);
|
|
17553
|
+
if (!command) {
|
|
17554
|
+
throw new Error("Command is required");
|
|
17555
|
+
}
|
|
17552
17556
|
sets.push("command = ?");
|
|
17553
|
-
values.push(
|
|
17557
|
+
values.push(command);
|
|
17554
17558
|
}
|
|
17555
17559
|
if (updates.args !== undefined) {
|
|
17556
17560
|
sets.push("args = ?");
|
package/dist/mcp/index.js
CHANGED
|
@@ -30832,8 +30832,12 @@ function updateServer(id, updates) {
|
|
|
30832
30832
|
values.push(updates.description);
|
|
30833
30833
|
}
|
|
30834
30834
|
if (updates.command !== undefined) {
|
|
30835
|
+
const command = normalizeCandidate(updates.command);
|
|
30836
|
+
if (!command) {
|
|
30837
|
+
throw new Error("Command is required");
|
|
30838
|
+
}
|
|
30835
30839
|
sets.push("command = ?");
|
|
30836
|
-
values.push(
|
|
30840
|
+
values.push(command);
|
|
30837
30841
|
}
|
|
30838
30842
|
if (updates.args !== undefined) {
|
|
30839
30843
|
sets.push("args = ?");
|
|
@@ -37682,8 +37686,12 @@ function isStdioMode(args = process.argv.slice(2)) {
|
|
|
37682
37686
|
function resolveHttpPort(args = process.argv.slice(2)) {
|
|
37683
37687
|
for (let i = 0;i < args.length; i++) {
|
|
37684
37688
|
const arg = args[i];
|
|
37685
|
-
if (arg === "--port"
|
|
37686
|
-
|
|
37689
|
+
if (arg === "--port") {
|
|
37690
|
+
const value = args[i + 1];
|
|
37691
|
+
if (value === undefined || value === "" || value.startsWith("--")) {
|
|
37692
|
+
throw new Error("Missing value for --port");
|
|
37693
|
+
}
|
|
37694
|
+
return parsePort(value);
|
|
37687
37695
|
}
|
|
37688
37696
|
if (arg.startsWith("--port=")) {
|
|
37689
37697
|
return parsePort(arg.slice("--port=".length));
|
|
@@ -37696,7 +37704,11 @@ function resolveHttpPort(args = process.argv.slice(2)) {
|
|
|
37696
37704
|
return DEFAULT_HTTP_PORT;
|
|
37697
37705
|
}
|
|
37698
37706
|
function parsePort(raw) {
|
|
37699
|
-
const
|
|
37707
|
+
const normalized = raw.trim();
|
|
37708
|
+
if (!/^\d+$/.test(normalized)) {
|
|
37709
|
+
throw new Error(`Invalid port: ${raw}`);
|
|
37710
|
+
}
|
|
37711
|
+
const port = Number(normalized);
|
|
37700
37712
|
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
37701
37713
|
throw new Error(`Invalid port: ${raw}`);
|
|
37702
37714
|
}
|