@mcp-use/cli 3.0.2 → 3.0.3-canary.0
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 +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6970,7 +6970,13 @@ program.command("start").description("Start production server").option("-p, --pa
|
|
|
6970
6970
|
try {
|
|
6971
6971
|
const projectPath = path7.resolve(options.path);
|
|
6972
6972
|
const portFlagProvided = process.argv.includes("--port") || process.argv.includes("-p") || process.argv.some((arg) => arg.startsWith("--port=")) || process.argv.some((arg) => arg.startsWith("-p="));
|
|
6973
|
-
|
|
6973
|
+
let port = portFlagProvided ? parseInt(options.port, 10) : parseInt(process.env.PORT || options.port || "3000", 10);
|
|
6974
|
+
if (!await isPortAvailable(port)) {
|
|
6975
|
+
console.log(source_default.yellow.bold(`\u26A0\uFE0F Port ${port} is already in use`));
|
|
6976
|
+
const availablePort = await findAvailablePort(port);
|
|
6977
|
+
console.log(source_default.green.bold(`\u2713 Using port ${availablePort} instead`));
|
|
6978
|
+
port = availablePort;
|
|
6979
|
+
}
|
|
6974
6980
|
console.log(
|
|
6975
6981
|
`\x1B[36m\x1B[1mmcp-use\x1B[0m \x1B[90mVersion: ${packageJson.version}\x1B[0m
|
|
6976
6982
|
`
|