@softtechai/quickmcp 1.1.8 → 1.1.11

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.1.8",
3
+ "version": "1.1.11",
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": {
@@ -135,6 +135,11 @@ function ensureWritableDataDir(preferredDir) {
135
135
  }
136
136
  }
137
137
 
138
+ function looksLikeNpxCachePath(dirPath) {
139
+ const normalized = String(dirPath || '').split(path.sep).join('/').toLowerCase();
140
+ return normalized.includes('/.npm/_npx/') || normalized.includes('/_npx/');
141
+ }
142
+
138
143
  // Default behavior: Web UI enabled unless explicitly disabled
139
144
  if (noWeb || process.env.QUICKMCP_ENABLE_WEB === '0' || process.env.QUICKMCP_DISABLE_WEB === '1') {
140
145
  process.env.QUICKMCP_ENABLE_WEB = '0';
@@ -149,6 +154,17 @@ if (dataDirArg) {
149
154
  const val = dataDirArg.split('=')[1];
150
155
  if (val) process.env.QUICKMCP_DATA_DIR = val;
151
156
  }
157
+ if (!dataDirArg && looksLikeNpxCachePath(process.env.QUICKMCP_DATA_DIR)) {
158
+ process.env.QUICKMCP_DATA_DIR = '';
159
+ }
160
+ if (process.env.QUICKMCP_DATA_DIR && !path.isAbsolute(process.env.QUICKMCP_DATA_DIR)) {
161
+ // Normalize relative env values (e.g. "./data") against caller CWD, not package root.
162
+ process.env.QUICKMCP_DATA_DIR = path.resolve(process.cwd(), process.env.QUICKMCP_DATA_DIR);
163
+ }
164
+ if (looksLikeNpxCachePath(process.env.QUICKMCP_DATA_DIR)) {
165
+ // Never persist SQLite under transient npx cache directories.
166
+ process.env.QUICKMCP_DATA_DIR = ensureWritableDataDir(resolveStableDefaultDataDir());
167
+ }
152
168
  if (!process.env.QUICKMCP_DATA_DIR) {
153
169
  process.env.QUICKMCP_DATA_DIR = ensureWritableDataDir(resolveStableDefaultDataDir());
154
170
  }
@@ -194,6 +210,7 @@ try {
194
210
 
195
211
  logger.error(`[QuickMCP] MCP auth mode: ${mcpAuthMode}`);
196
212
  logger.error(`[QuickMCP] MCP token present: ${mcpToken ? 'yes' : 'no'}`);
213
+ logger.error(`[QuickMCP] QUICKMCP_DATA_DIR: ${process.env.QUICKMCP_DATA_DIR || '(unset)'}`);
197
214
  if (mcpAuthMode === 'LITE') {
198
215
  logger.error(`[QuickMCP] SQLite path: ${sqlitePath || '(unavailable)'}`);
199
216
  }