@mcp-use/cli 3.0.2-canary.7 → 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.cjs
CHANGED
|
@@ -6990,7 +6990,13 @@ program.command("start").description("Start production server").option("-p, --pa
|
|
|
6990
6990
|
try {
|
|
6991
6991
|
const projectPath = import_node_path8.default.resolve(options.path);
|
|
6992
6992
|
const portFlagProvided = process.argv.includes("--port") || process.argv.includes("-p") || process.argv.some((arg) => arg.startsWith("--port=")) || process.argv.some((arg) => arg.startsWith("-p="));
|
|
6993
|
-
|
|
6993
|
+
let port = portFlagProvided ? parseInt(options.port, 10) : parseInt(process.env.PORT || options.port || "3000", 10);
|
|
6994
|
+
if (!await isPortAvailable(port)) {
|
|
6995
|
+
console.log(source_default.yellow.bold(`\u26A0\uFE0F Port ${port} is already in use`));
|
|
6996
|
+
const availablePort = await findAvailablePort(port);
|
|
6997
|
+
console.log(source_default.green.bold(`\u2713 Using port ${availablePort} instead`));
|
|
6998
|
+
port = availablePort;
|
|
6999
|
+
}
|
|
6994
7000
|
console.log(
|
|
6995
7001
|
`\x1B[36m\x1B[1mmcp-use\x1B[0m \x1B[90mVersion: ${packageJson.version}\x1B[0m
|
|
6996
7002
|
`
|