@hasna/mcps 0.0.24 → 0.0.25
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 +12 -4
- package/bin/mcp.js +11 -3
- package/dist/mcp/index.js +11 -3
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -36446,7 +36446,7 @@ var init_provider_profiles = __esm(() => {
|
|
|
36446
36446
|
var require_package = __commonJS((exports, module) => {
|
|
36447
36447
|
module.exports = {
|
|
36448
36448
|
name: "@hasna/mcps",
|
|
36449
|
-
version: "0.0.
|
|
36449
|
+
version: "0.0.25",
|
|
36450
36450
|
description: "Meta-MCP registry & CLI \u2014 discover, manage, and proxy MCP servers",
|
|
36451
36451
|
type: "module",
|
|
36452
36452
|
repository: {
|
|
@@ -41303,8 +41303,12 @@ function isStdioMode(args = process.argv.slice(2)) {
|
|
|
41303
41303
|
function resolveHttpPort(args = process.argv.slice(2)) {
|
|
41304
41304
|
for (let i = 0;i < args.length; i++) {
|
|
41305
41305
|
const arg = args[i];
|
|
41306
|
-
if (arg === "--port"
|
|
41307
|
-
|
|
41306
|
+
if (arg === "--port") {
|
|
41307
|
+
const value = args[i + 1];
|
|
41308
|
+
if (value === undefined || value === "" || value.startsWith("--")) {
|
|
41309
|
+
throw new Error("Missing value for --port");
|
|
41310
|
+
}
|
|
41311
|
+
return parsePort(value);
|
|
41308
41312
|
}
|
|
41309
41313
|
if (arg.startsWith("--port=")) {
|
|
41310
41314
|
return parsePort(arg.slice("--port=".length));
|
|
@@ -41317,7 +41321,11 @@ function resolveHttpPort(args = process.argv.slice(2)) {
|
|
|
41317
41321
|
return DEFAULT_HTTP_PORT;
|
|
41318
41322
|
}
|
|
41319
41323
|
function parsePort(raw) {
|
|
41320
|
-
const
|
|
41324
|
+
const normalized = raw.trim();
|
|
41325
|
+
if (!/^\d+$/.test(normalized)) {
|
|
41326
|
+
throw new Error(`Invalid port: ${raw}`);
|
|
41327
|
+
}
|
|
41328
|
+
const port = Number(normalized);
|
|
41321
41329
|
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
41322
41330
|
throw new Error(`Invalid port: ${raw}`);
|
|
41323
41331
|
}
|
package/bin/mcp.js
CHANGED
|
@@ -37682,8 +37682,12 @@ function isStdioMode(args = process.argv.slice(2)) {
|
|
|
37682
37682
|
function resolveHttpPort(args = process.argv.slice(2)) {
|
|
37683
37683
|
for (let i = 0;i < args.length; i++) {
|
|
37684
37684
|
const arg = args[i];
|
|
37685
|
-
if (arg === "--port"
|
|
37686
|
-
|
|
37685
|
+
if (arg === "--port") {
|
|
37686
|
+
const value = args[i + 1];
|
|
37687
|
+
if (value === undefined || value === "" || value.startsWith("--")) {
|
|
37688
|
+
throw new Error("Missing value for --port");
|
|
37689
|
+
}
|
|
37690
|
+
return parsePort(value);
|
|
37687
37691
|
}
|
|
37688
37692
|
if (arg.startsWith("--port=")) {
|
|
37689
37693
|
return parsePort(arg.slice("--port=".length));
|
|
@@ -37696,7 +37700,11 @@ function resolveHttpPort(args = process.argv.slice(2)) {
|
|
|
37696
37700
|
return DEFAULT_HTTP_PORT;
|
|
37697
37701
|
}
|
|
37698
37702
|
function parsePort(raw) {
|
|
37699
|
-
const
|
|
37703
|
+
const normalized = raw.trim();
|
|
37704
|
+
if (!/^\d+$/.test(normalized)) {
|
|
37705
|
+
throw new Error(`Invalid port: ${raw}`);
|
|
37706
|
+
}
|
|
37707
|
+
const port = Number(normalized);
|
|
37700
37708
|
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
37701
37709
|
throw new Error(`Invalid port: ${raw}`);
|
|
37702
37710
|
}
|
package/dist/mcp/index.js
CHANGED
|
@@ -37682,8 +37682,12 @@ function isStdioMode(args = process.argv.slice(2)) {
|
|
|
37682
37682
|
function resolveHttpPort(args = process.argv.slice(2)) {
|
|
37683
37683
|
for (let i = 0;i < args.length; i++) {
|
|
37684
37684
|
const arg = args[i];
|
|
37685
|
-
if (arg === "--port"
|
|
37686
|
-
|
|
37685
|
+
if (arg === "--port") {
|
|
37686
|
+
const value = args[i + 1];
|
|
37687
|
+
if (value === undefined || value === "" || value.startsWith("--")) {
|
|
37688
|
+
throw new Error("Missing value for --port");
|
|
37689
|
+
}
|
|
37690
|
+
return parsePort(value);
|
|
37687
37691
|
}
|
|
37688
37692
|
if (arg.startsWith("--port=")) {
|
|
37689
37693
|
return parsePort(arg.slice("--port=".length));
|
|
@@ -37696,7 +37700,11 @@ function resolveHttpPort(args = process.argv.slice(2)) {
|
|
|
37696
37700
|
return DEFAULT_HTTP_PORT;
|
|
37697
37701
|
}
|
|
37698
37702
|
function parsePort(raw) {
|
|
37699
|
-
const
|
|
37703
|
+
const normalized = raw.trim();
|
|
37704
|
+
if (!/^\d+$/.test(normalized)) {
|
|
37705
|
+
throw new Error(`Invalid port: ${raw}`);
|
|
37706
|
+
}
|
|
37707
|
+
const port = Number(normalized);
|
|
37700
37708
|
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
37701
37709
|
throw new Error(`Invalid port: ${raw}`);
|
|
37702
37710
|
}
|