@softtechai/quickmcp 1.0.13 → 1.0.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softtechai/quickmcp",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
4
4
  "description": "An application to generate MCP servers from various data sources and test them",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -60,8 +60,9 @@ if (process.env.QUICKMCP_ENABLE_WEB === '1') {
60
60
  try { fs.mkdirSync(uploadsDir, { recursive: true }); } catch {}
61
61
  if (!process.env.QUICKMCP_UPLOAD_DIR) process.env.QUICKMCP_UPLOAD_DIR = uploadsDir;
62
62
 
63
- // Acquire a simple lock so only one process owns the UI (port 3000)
64
- const lockPath = path.join(runDir, 'ui-3000.lock');
63
+ // Determine preferred port and acquire a simple lock so only one process owns the UI for that port
64
+ const preferredPort = parseInt(process.env.PORT || '3000', 10);
65
+ const lockPath = path.join(runDir, `ui-${preferredPort}.lock`);
65
66
  let hasLock = false;
66
67
  try {
67
68
  const fd = fs.openSync(lockPath, 'wx');
@@ -83,7 +84,6 @@ if (process.env.QUICKMCP_ENABLE_WEB === '1') {
83
84
  }
84
85
 
85
86
  // Only start Web UI if preferred port is actually free.
86
- const preferredPort = parseInt(process.env.PORT || '3000', 10);
87
87
  const probe = net.createServer();
88
88
  probe.once('error', (err) => {
89
89
  if (err && (err.code === 'EADDRINUSE' || err.code === 'EACCES')) {