@hasna/mcps 0.0.25 → 0.0.27

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 CHANGED
@@ -12808,16 +12808,24 @@ function updateServer(id, updates) {
12808
12808
  const sets = [];
12809
12809
  const values = [];
12810
12810
  if (updates.name !== undefined) {
12811
+ const name = normalizeCandidate(updates.name);
12812
+ if (!name) {
12813
+ throw new Error("Name is required");
12814
+ }
12811
12815
  sets.push("name = ?");
12812
- values.push(updates.name);
12816
+ values.push(name);
12813
12817
  }
12814
12818
  if (updates.description !== undefined) {
12815
12819
  sets.push("description = ?");
12816
12820
  values.push(updates.description);
12817
12821
  }
12818
12822
  if (updates.command !== undefined) {
12823
+ const command = normalizeCandidate(updates.command);
12824
+ if (!command) {
12825
+ throw new Error("Command is required");
12826
+ }
12819
12827
  sets.push("command = ?");
12820
- values.push(updates.command);
12828
+ values.push(command);
12821
12829
  }
12822
12830
  if (updates.args !== undefined) {
12823
12831
  sets.push("args = ?");
@@ -36446,7 +36454,7 @@ var init_provider_profiles = __esm(() => {
36446
36454
  var require_package = __commonJS((exports, module) => {
36447
36455
  module.exports = {
36448
36456
  name: "@hasna/mcps",
36449
- version: "0.0.25",
36457
+ version: "0.0.27",
36450
36458
  description: "Meta-MCP registry & CLI \u2014 discover, manage, and proxy MCP servers",
36451
36459
  type: "module",
36452
36460
  repository: {
@@ -42508,12 +42516,28 @@ Dashboard not found at: ${dashboardDir}`);
42508
42516
  return json({ error: "Invalid JSON body" }, 400, port);
42509
42517
  }
42510
42518
  const fields = {};
42511
- if (body.name !== undefined)
42512
- fields.name = body.name;
42519
+ if (body.name !== undefined) {
42520
+ if (typeof body.name !== "string") {
42521
+ return json({ error: "Invalid 'name' format" }, 400, port);
42522
+ }
42523
+ const name = body.name.trim();
42524
+ if (!name) {
42525
+ return json({ error: "Name is required" }, 400, port);
42526
+ }
42527
+ fields.name = name;
42528
+ }
42513
42529
  if (body.description !== undefined)
42514
42530
  fields.description = body.description;
42515
- if (body.command !== undefined)
42516
- fields.command = body.command;
42531
+ if (body.command !== undefined) {
42532
+ if (typeof body.command !== "string") {
42533
+ return json({ error: "Invalid 'command' format" }, 400, port);
42534
+ }
42535
+ const command = body.command.trim();
42536
+ if (!command) {
42537
+ return json({ error: "Command is required" }, 400, port);
42538
+ }
42539
+ fields.command = command;
42540
+ }
42517
42541
  if (body.env !== undefined)
42518
42542
  fields.env = body.env;
42519
42543
  if (body.credential_refs !== undefined || body.credentialRefs !== undefined) {
package/bin/mcp.js CHANGED
@@ -30824,16 +30824,24 @@ function updateServer(id, updates) {
30824
30824
  const sets = [];
30825
30825
  const values = [];
30826
30826
  if (updates.name !== undefined) {
30827
+ const name = normalizeCandidate(updates.name);
30828
+ if (!name) {
30829
+ throw new Error("Name is required");
30830
+ }
30827
30831
  sets.push("name = ?");
30828
- values.push(updates.name);
30832
+ values.push(name);
30829
30833
  }
30830
30834
  if (updates.description !== undefined) {
30831
30835
  sets.push("description = ?");
30832
30836
  values.push(updates.description);
30833
30837
  }
30834
30838
  if (updates.command !== undefined) {
30839
+ const command = normalizeCandidate(updates.command);
30840
+ if (!command) {
30841
+ throw new Error("Command is required");
30842
+ }
30835
30843
  sets.push("command = ?");
30836
- values.push(updates.command);
30844
+ values.push(command);
30837
30845
  }
30838
30846
  if (updates.args !== undefined) {
30839
30847
  sets.push("args = ?");
package/dist/index.js CHANGED
@@ -17541,16 +17541,24 @@ function updateServer(id, updates) {
17541
17541
  const sets = [];
17542
17542
  const values = [];
17543
17543
  if (updates.name !== undefined) {
17544
+ const name = normalizeCandidate(updates.name);
17545
+ if (!name) {
17546
+ throw new Error("Name is required");
17547
+ }
17544
17548
  sets.push("name = ?");
17545
- values.push(updates.name);
17549
+ values.push(name);
17546
17550
  }
17547
17551
  if (updates.description !== undefined) {
17548
17552
  sets.push("description = ?");
17549
17553
  values.push(updates.description);
17550
17554
  }
17551
17555
  if (updates.command !== undefined) {
17556
+ const command = normalizeCandidate(updates.command);
17557
+ if (!command) {
17558
+ throw new Error("Command is required");
17559
+ }
17552
17560
  sets.push("command = ?");
17553
- values.push(updates.command);
17561
+ values.push(command);
17554
17562
  }
17555
17563
  if (updates.args !== undefined) {
17556
17564
  sets.push("args = ?");
package/dist/mcp/index.js CHANGED
@@ -30824,16 +30824,24 @@ function updateServer(id, updates) {
30824
30824
  const sets = [];
30825
30825
  const values = [];
30826
30826
  if (updates.name !== undefined) {
30827
+ const name = normalizeCandidate(updates.name);
30828
+ if (!name) {
30829
+ throw new Error("Name is required");
30830
+ }
30827
30831
  sets.push("name = ?");
30828
- values.push(updates.name);
30832
+ values.push(name);
30829
30833
  }
30830
30834
  if (updates.description !== undefined) {
30831
30835
  sets.push("description = ?");
30832
30836
  values.push(updates.description);
30833
30837
  }
30834
30838
  if (updates.command !== undefined) {
30839
+ const command = normalizeCandidate(updates.command);
30840
+ if (!command) {
30841
+ throw new Error("Command is required");
30842
+ }
30835
30843
  sets.push("command = ?");
30836
- values.push(updates.command);
30844
+ values.push(command);
30837
30845
  }
30838
30846
  if (updates.args !== undefined) {
30839
30847
  sets.push("args = ?");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/mcps",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "Meta-MCP registry & CLI — discover, manage, and proxy MCP servers",
5
5
  "type": "module",
6
6
  "repository": {