@mcp-use/cli 2.11.0-canary.8 → 2.11.0-canary.9
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.cjs +31 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -4452,6 +4452,35 @@ var packageContent = (0, import_node_fs8.readFileSync)(
|
|
|
4452
4452
|
var packageJson = JSON.parse(packageContent);
|
|
4453
4453
|
var packageVersion = packageJson.version || "unknown";
|
|
4454
4454
|
program.name("mcp-use").description("Create and run MCP servers with ui resources widgets").version(packageVersion);
|
|
4455
|
+
function displayPackageVersions() {
|
|
4456
|
+
const packages = [
|
|
4457
|
+
{ name: "@mcp-use/cli", path: "../package.json" },
|
|
4458
|
+
{ name: "@mcp-use/inspector", path: "../../inspector/package.json" },
|
|
4459
|
+
{
|
|
4460
|
+
name: "create-mcp-use-app",
|
|
4461
|
+
path: "../../create-mcp-use-app/package.json"
|
|
4462
|
+
},
|
|
4463
|
+
{ name: "mcp-use", path: "../../mcp-use/package.json", highlight: true }
|
|
4464
|
+
];
|
|
4465
|
+
console.log(source_default.gray("mcp-use packages:"));
|
|
4466
|
+
for (const pkg of packages) {
|
|
4467
|
+
try {
|
|
4468
|
+
const pkgPath = import_node_path6.default.join(__dirname, pkg.path);
|
|
4469
|
+
const pkgContent = (0, import_node_fs8.readFileSync)(pkgPath, "utf-8");
|
|
4470
|
+
const pkgJson = JSON.parse(pkgContent);
|
|
4471
|
+
const version = pkgJson.version || "unknown";
|
|
4472
|
+
const paddedName = pkg.name.padEnd(22);
|
|
4473
|
+
if (pkg.highlight) {
|
|
4474
|
+
console.log(
|
|
4475
|
+
` ${source_default.cyan.bold(paddedName)} ${source_default.cyan.bold(`v${version}`)}`
|
|
4476
|
+
);
|
|
4477
|
+
} else {
|
|
4478
|
+
console.log(source_default.gray(` ${paddedName} v${version}`));
|
|
4479
|
+
}
|
|
4480
|
+
} catch (error) {
|
|
4481
|
+
}
|
|
4482
|
+
}
|
|
4483
|
+
}
|
|
4455
4484
|
async function isPortAvailable(port, host = "localhost") {
|
|
4456
4485
|
try {
|
|
4457
4486
|
await fetch(`http://${host}:${port}`);
|
|
@@ -5008,7 +5037,7 @@ program.command("build").description("Build TypeScript and MCP UI widgets").opti
|
|
|
5008
5037
|
try {
|
|
5009
5038
|
const projectPath = import_node_path6.default.resolve(options.path);
|
|
5010
5039
|
const { promises: fs10 } = await import("fs");
|
|
5011
|
-
|
|
5040
|
+
displayPackageVersions();
|
|
5012
5041
|
const builtWidgets = await buildWidgets(projectPath);
|
|
5013
5042
|
console.log(source_default.gray("Building TypeScript..."));
|
|
5014
5043
|
await runCommand("npx", ["tsc"], projectPath);
|
|
@@ -5072,7 +5101,7 @@ program.command("dev").description("Run development server with auto-reload and
|
|
|
5072
5101
|
let port = parseInt(options.port, 10);
|
|
5073
5102
|
const host = options.host;
|
|
5074
5103
|
const useHmr = options.hmr !== false;
|
|
5075
|
-
|
|
5104
|
+
displayPackageVersions();
|
|
5076
5105
|
if (!await isPortAvailable(port, host)) {
|
|
5077
5106
|
console.log(source_default.yellow.bold(`\u26A0\uFE0F Port ${port} is already in use`));
|
|
5078
5107
|
const availablePort = await findAvailablePort2(port, host);
|