sitepaige-mcp-server 0.7.10 → 0.7.12
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/defaultapp/db-mysql.ts
CHANGED
|
@@ -44,11 +44,7 @@ export async function db_init(): Promise<mysql.Pool> {
|
|
|
44
44
|
// Create the pool
|
|
45
45
|
pool = mysql.createPool(poolConfig);
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
const connection = await pool.getConnection();
|
|
49
|
-
await connection.ping();
|
|
50
|
-
connection.release();
|
|
51
|
-
|
|
47
|
+
|
|
52
48
|
return pool;
|
|
53
49
|
} catch (error) {
|
|
54
50
|
throw error;
|
|
@@ -20,11 +20,6 @@ export async function db_init(): Promise<Pool> {
|
|
|
20
20
|
// Return a mock pool object that won't cause errors
|
|
21
21
|
return {} as Pool;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
// Return existing pool if already initialized
|
|
25
|
-
if (pool) {
|
|
26
|
-
return pool;
|
|
27
|
-
}
|
|
28
23
|
|
|
29
24
|
try {
|
|
30
25
|
// Create connection configuration
|
|
@@ -51,13 +46,12 @@ export async function db_init(): Promise<Pool> {
|
|
|
51
46
|
|
|
52
47
|
// Create the pool
|
|
53
48
|
pool = new Pool(poolConfig);
|
|
54
|
-
|
|
55
|
-
// Test the connection
|
|
56
|
-
await pool.query('SELECT NOW()');
|
|
49
|
+
|
|
57
50
|
|
|
58
51
|
return pool;
|
|
59
52
|
} catch (error) {
|
|
60
|
-
|
|
53
|
+
console.error(error);
|
|
54
|
+
return null;
|
|
61
55
|
}
|
|
62
56
|
}
|
|
63
57
|
|
|
@@ -102,10 +96,9 @@ export async function db_query(
|
|
|
102
96
|
|
|
103
97
|
} catch (error) {
|
|
104
98
|
// If table doesn't exist for SELECT, return empty array
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
throw error;
|
|
99
|
+
console.error(error);
|
|
100
|
+
return [];
|
|
101
|
+
|
|
109
102
|
}
|
|
110
103
|
}
|
|
111
104
|
|
|
@@ -44,11 +44,7 @@ export async function db_init(): Promise<mysql.Pool> {
|
|
|
44
44
|
// Create the pool
|
|
45
45
|
pool = mysql.createPool(poolConfig);
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
const connection = await pool.getConnection();
|
|
49
|
-
await connection.ping();
|
|
50
|
-
connection.release();
|
|
51
|
-
|
|
47
|
+
|
|
52
48
|
return pool;
|
|
53
49
|
} catch (error) {
|
|
54
50
|
throw error;
|
|
@@ -20,11 +20,6 @@ export async function db_init(): Promise<Pool> {
|
|
|
20
20
|
// Return a mock pool object that won't cause errors
|
|
21
21
|
return {} as Pool;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
// Return existing pool if already initialized
|
|
25
|
-
if (pool) {
|
|
26
|
-
return pool;
|
|
27
|
-
}
|
|
28
23
|
|
|
29
24
|
try {
|
|
30
25
|
// Create connection configuration
|
|
@@ -51,13 +46,12 @@ export async function db_init(): Promise<Pool> {
|
|
|
51
46
|
|
|
52
47
|
// Create the pool
|
|
53
48
|
pool = new Pool(poolConfig);
|
|
54
|
-
|
|
55
|
-
// Test the connection
|
|
56
|
-
await pool.query('SELECT NOW()');
|
|
49
|
+
|
|
57
50
|
|
|
58
51
|
return pool;
|
|
59
52
|
} catch (error) {
|
|
60
|
-
|
|
53
|
+
console.error(error);
|
|
54
|
+
return null;
|
|
61
55
|
}
|
|
62
56
|
}
|
|
63
57
|
|
|
@@ -102,10 +96,9 @@ export async function db_query(
|
|
|
102
96
|
|
|
103
97
|
} catch (error) {
|
|
104
98
|
// If table doesn't exist for SELECT, return empty array
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
throw error;
|
|
99
|
+
console.error(error);
|
|
100
|
+
return [];
|
|
101
|
+
|
|
109
102
|
}
|
|
110
103
|
}
|
|
111
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sitepaige-mcp-server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP server for generating web applications using SitePaige AI. Generate frontend (FREE/12 credits) then optionally add backend (50 credits)",
|
|
6
6
|
"keywords": [
|