@mcp-use/cli 2.2.3-canary.6 → 2.2.3-canary.8
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/dist/index.js +16 -15
- package/dist/index.mjs +16 -15
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1238,8 +1238,16 @@ async function startTunnel(port, subdomain) {
|
|
|
1238
1238
|
if (urlMatch && !resolved) {
|
|
1239
1239
|
const url = urlMatch[0];
|
|
1240
1240
|
const fullDomain = urlMatch[1];
|
|
1241
|
-
const subdomainMatch = fullDomain.match(/^([a-z0-9-]+)\./);
|
|
1242
|
-
|
|
1241
|
+
const subdomainMatch = fullDomain.match(/^([a-z0-9-]+)\./i);
|
|
1242
|
+
let extractedSubdomain = subdomainMatch ? subdomainMatch[1] : fullDomain.split(".")[0];
|
|
1243
|
+
if (!/^[a-z0-9-]+$/i.test(extractedSubdomain)) {
|
|
1244
|
+
console.warn(
|
|
1245
|
+
import_chalk3.default.yellow(
|
|
1246
|
+
`Warning: Extracted subdomain "${extractedSubdomain}" does not match expected format.`
|
|
1247
|
+
)
|
|
1248
|
+
);
|
|
1249
|
+
extractedSubdomain = "";
|
|
1250
|
+
}
|
|
1243
1251
|
resolved = true;
|
|
1244
1252
|
clearTimeout(setupTimeout);
|
|
1245
1253
|
console.log(import_chalk3.default.green.bold(`\u2713 Tunnel established: ${url}/mcp`));
|
|
@@ -1292,18 +1300,6 @@ async function buildWidgets(projectPath) {
|
|
|
1292
1300
|
const { build } = await import("vite");
|
|
1293
1301
|
const resourcesDir = import_node_path3.default.join(projectPath, "resources");
|
|
1294
1302
|
const mcpUrl = process.env.MCP_URL;
|
|
1295
|
-
if (!mcpUrl) {
|
|
1296
|
-
console.log(
|
|
1297
|
-
import_chalk3.default.yellow(
|
|
1298
|
-
"\u26A0\uFE0F MCP_URL not set - using relative paths (widgets may not work correctly)"
|
|
1299
|
-
)
|
|
1300
|
-
);
|
|
1301
|
-
console.log(
|
|
1302
|
-
import_chalk3.default.gray(
|
|
1303
|
-
" Set MCP_URL environment variable for production builds (e.g., https://myserver.com)"
|
|
1304
|
-
)
|
|
1305
|
-
);
|
|
1306
|
-
}
|
|
1307
1303
|
try {
|
|
1308
1304
|
await (0, import_promises.access)(resourcesDir);
|
|
1309
1305
|
} catch {
|
|
@@ -1627,7 +1623,12 @@ program.command("start").description("Start production server").option("-p, --pa
|
|
|
1627
1623
|
import_chalk3.default.gray(`Found existing subdomain: ${existingSubdomain}`)
|
|
1628
1624
|
);
|
|
1629
1625
|
}
|
|
1630
|
-
} catch {
|
|
1626
|
+
} catch (error) {
|
|
1627
|
+
console.debug(
|
|
1628
|
+
import_chalk3.default.gray(
|
|
1629
|
+
`Debug: Failed to read or parse mcp-use.json: ${error instanceof Error ? error.message : String(error)}`
|
|
1630
|
+
)
|
|
1631
|
+
);
|
|
1631
1632
|
}
|
|
1632
1633
|
const tunnelInfo = await startTunnel(port, existingSubdomain);
|
|
1633
1634
|
mcpUrl = tunnelInfo.url;
|
package/dist/index.mjs
CHANGED
|
@@ -1217,8 +1217,16 @@ async function startTunnel(port, subdomain) {
|
|
|
1217
1217
|
if (urlMatch && !resolved) {
|
|
1218
1218
|
const url = urlMatch[0];
|
|
1219
1219
|
const fullDomain = urlMatch[1];
|
|
1220
|
-
const subdomainMatch = fullDomain.match(/^([a-z0-9-]+)\./);
|
|
1221
|
-
|
|
1220
|
+
const subdomainMatch = fullDomain.match(/^([a-z0-9-]+)\./i);
|
|
1221
|
+
let extractedSubdomain = subdomainMatch ? subdomainMatch[1] : fullDomain.split(".")[0];
|
|
1222
|
+
if (!/^[a-z0-9-]+$/i.test(extractedSubdomain)) {
|
|
1223
|
+
console.warn(
|
|
1224
|
+
chalk3.yellow(
|
|
1225
|
+
`Warning: Extracted subdomain "${extractedSubdomain}" does not match expected format.`
|
|
1226
|
+
)
|
|
1227
|
+
);
|
|
1228
|
+
extractedSubdomain = "";
|
|
1229
|
+
}
|
|
1222
1230
|
resolved = true;
|
|
1223
1231
|
clearTimeout(setupTimeout);
|
|
1224
1232
|
console.log(chalk3.green.bold(`\u2713 Tunnel established: ${url}/mcp`));
|
|
@@ -1271,18 +1279,6 @@ async function buildWidgets(projectPath) {
|
|
|
1271
1279
|
const { build } = await import("vite");
|
|
1272
1280
|
const resourcesDir = path3.join(projectPath, "resources");
|
|
1273
1281
|
const mcpUrl = process.env.MCP_URL;
|
|
1274
|
-
if (!mcpUrl) {
|
|
1275
|
-
console.log(
|
|
1276
|
-
chalk3.yellow(
|
|
1277
|
-
"\u26A0\uFE0F MCP_URL not set - using relative paths (widgets may not work correctly)"
|
|
1278
|
-
)
|
|
1279
|
-
);
|
|
1280
|
-
console.log(
|
|
1281
|
-
chalk3.gray(
|
|
1282
|
-
" Set MCP_URL environment variable for production builds (e.g., https://myserver.com)"
|
|
1283
|
-
)
|
|
1284
|
-
);
|
|
1285
|
-
}
|
|
1286
1282
|
try {
|
|
1287
1283
|
await access(resourcesDir);
|
|
1288
1284
|
} catch {
|
|
@@ -1606,7 +1602,12 @@ program.command("start").description("Start production server").option("-p, --pa
|
|
|
1606
1602
|
chalk3.gray(`Found existing subdomain: ${existingSubdomain}`)
|
|
1607
1603
|
);
|
|
1608
1604
|
}
|
|
1609
|
-
} catch {
|
|
1605
|
+
} catch (error) {
|
|
1606
|
+
console.debug(
|
|
1607
|
+
chalk3.gray(
|
|
1608
|
+
`Debug: Failed to read or parse mcp-use.json: ${error instanceof Error ? error.message : String(error)}`
|
|
1609
|
+
)
|
|
1610
|
+
);
|
|
1610
1611
|
}
|
|
1611
1612
|
const tunnelInfo = await startTunnel(port, existingSubdomain);
|
|
1612
1613
|
mcpUrl = tunnelInfo.url;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-use/cli",
|
|
3
|
-
"version": "2.2.3-canary.
|
|
3
|
+
"version": "2.2.3-canary.8",
|
|
4
4
|
"description": "Build tool for MCP UI widgets - bundles React components into standalone HTML pages for Model Context Protocol servers",
|
|
5
5
|
"author": "mcp-use, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"tsx": "^4.0.0",
|
|
45
45
|
"vite": "^6.0.0",
|
|
46
46
|
"ws": "^8.18.0",
|
|
47
|
-
"
|
|
48
|
-
"mcp-use": "
|
|
47
|
+
"mcp-use": "1.3.3-canary.8",
|
|
48
|
+
"@mcp-use/inspector": "0.5.3-canary.8"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^20.0.0",
|