@programinglive/dev-workflow-mcp-server 1.7.11 → 1.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.
@@ -9,7 +9,7 @@
9
9
  "version": "0.1.0",
10
10
  "dependencies": {
11
11
  "lucide-react": "^0.555.0",
12
- "next": "16.0.4",
12
+ "next": "^16.0.10",
13
13
  "react": "19.2.0",
14
14
  "react-dom": "19.2.0"
15
15
  },
@@ -1038,9 +1038,9 @@
1038
1038
  }
1039
1039
  },
1040
1040
  "node_modules/@next/env": {
1041
- "version": "16.0.4",
1042
- "resolved": "https://registry.npmjs.org/@next/env/-/env-16.0.4.tgz",
1043
- "integrity": "sha512-FDPaVoB1kYhtOz6Le0Jn2QV7RZJ3Ngxzqri7YX4yu3Ini+l5lciR7nA9eNDpKTmDm7LWZtxSju+/CQnwRBn2pA==",
1041
+ "version": "16.0.10",
1042
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-16.0.10.tgz",
1043
+ "integrity": "sha512-8tuaQkyDVgeONQ1MeT9Mkk8pQmZapMKFh5B+OrFUlG3rVmYTXcXlBetBgTurKXGaIZvkoqRT9JL5K3phXcgang==",
1044
1044
  "license": "MIT"
1045
1045
  },
1046
1046
  "node_modules/@next/eslint-plugin-next": {
@@ -1054,9 +1054,9 @@
1054
1054
  }
1055
1055
  },
1056
1056
  "node_modules/@next/swc-darwin-arm64": {
1057
- "version": "16.0.4",
1058
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.0.4.tgz",
1059
- "integrity": "sha512-TN0cfB4HT2YyEio9fLwZY33J+s+vMIgC84gQCOLZOYusW7ptgjIn8RwxQt0BUpoo9XRRVVWEHLld0uhyux1ZcA==",
1057
+ "version": "16.0.10",
1058
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.0.10.tgz",
1059
+ "integrity": "sha512-4XgdKtdVsaflErz+B5XeG0T5PeXKDdruDf3CRpnhN+8UebNa5N2H58+3GDgpn/9GBurrQ1uWW768FfscwYkJRg==",
1060
1060
  "cpu": [
1061
1061
  "arm64"
1062
1062
  ],
@@ -1070,9 +1070,9 @@
1070
1070
  }
1071
1071
  },
1072
1072
  "node_modules/@next/swc-darwin-x64": {
1073
- "version": "16.0.4",
1074
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.0.4.tgz",
1075
- "integrity": "sha512-XsfI23jvimCaA7e+9f3yMCoVjrny2D11G6H8NCcgv+Ina/TQhKPXB9P4q0WjTuEoyZmcNvPdrZ+XtTh3uPfH7Q==",
1073
+ "version": "16.0.10",
1074
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.0.10.tgz",
1075
+ "integrity": "sha512-spbEObMvRKkQ3CkYVOME+ocPDFo5UqHb8EMTS78/0mQ+O1nqE8toHJVioZo4TvebATxgA8XMTHHrScPrn68OGw==",
1076
1076
  "cpu": [
1077
1077
  "x64"
1078
1078
  ],
@@ -1086,9 +1086,9 @@
1086
1086
  }
1087
1087
  },
1088
1088
  "node_modules/@next/swc-linux-arm64-gnu": {
1089
- "version": "16.0.4",
1090
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.0.4.tgz",
1091
- "integrity": "sha512-uo8X7qHDy4YdJUhaoJDMAbL8VT5Ed3lijip2DdBHIB4tfKAvB1XBih6INH2L4qIi4jA0Qq1J0ErxcOocBmUSwg==",
1089
+ "version": "16.0.10",
1090
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.0.10.tgz",
1091
+ "integrity": "sha512-uQtWE3X0iGB8apTIskOMi2w/MKONrPOUCi5yLO+v3O8Mb5c7K4Q5KD1jvTpTF5gJKa3VH/ijKjKUq9O9UhwOYw==",
1092
1092
  "cpu": [
1093
1093
  "arm64"
1094
1094
  ],
@@ -1102,9 +1102,9 @@
1102
1102
  }
1103
1103
  },
1104
1104
  "node_modules/@next/swc-linux-arm64-musl": {
1105
- "version": "16.0.4",
1106
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.0.4.tgz",
1107
- "integrity": "sha512-pvR/AjNIAxsIz0PCNcZYpH+WmNIKNLcL4XYEfo+ArDi7GsxKWFO5BvVBLXbhti8Coyv3DE983NsitzUsGH5yTw==",
1105
+ "version": "16.0.10",
1106
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.0.10.tgz",
1107
+ "integrity": "sha512-llA+hiDTrYvyWI21Z0L1GiXwjQaanPVQQwru5peOgtooeJ8qx3tlqRV2P7uH2pKQaUfHxI/WVarvI5oYgGxaTw==",
1108
1108
  "cpu": [
1109
1109
  "arm64"
1110
1110
  ],
@@ -1118,9 +1118,9 @@
1118
1118
  }
1119
1119
  },
1120
1120
  "node_modules/@next/swc-linux-x64-gnu": {
1121
- "version": "16.0.4",
1122
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.0.4.tgz",
1123
- "integrity": "sha512-2hebpsd5MRRtgqmT7Jj/Wze+wG+ZEXUK2KFFL4IlZ0amEEFADo4ywsifJNeFTQGsamH3/aXkKWymDvgEi+pc2Q==",
1121
+ "version": "16.0.10",
1122
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.0.10.tgz",
1123
+ "integrity": "sha512-AK2q5H0+a9nsXbeZ3FZdMtbtu9jxW4R/NgzZ6+lrTm3d6Zb7jYrWcgjcpM1k8uuqlSy4xIyPR2YiuUr+wXsavA==",
1124
1124
  "cpu": [
1125
1125
  "x64"
1126
1126
  ],
@@ -1134,9 +1134,9 @@
1134
1134
  }
1135
1135
  },
1136
1136
  "node_modules/@next/swc-linux-x64-musl": {
1137
- "version": "16.0.4",
1138
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.0.4.tgz",
1139
- "integrity": "sha512-pzRXf0LZZ8zMljH78j8SeLncg9ifIOp3ugAFka+Bq8qMzw6hPXOc7wydY7ardIELlczzzreahyTpwsim/WL3Sg==",
1137
+ "version": "16.0.10",
1138
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.0.10.tgz",
1139
+ "integrity": "sha512-1TDG9PDKivNw5550S111gsO4RGennLVl9cipPhtkXIFVwo31YZ73nEbLjNC8qG3SgTz/QZyYyaFYMeY4BKZR/g==",
1140
1140
  "cpu": [
1141
1141
  "x64"
1142
1142
  ],
@@ -1150,9 +1150,9 @@
1150
1150
  }
1151
1151
  },
1152
1152
  "node_modules/@next/swc-win32-arm64-msvc": {
1153
- "version": "16.0.4",
1154
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.0.4.tgz",
1155
- "integrity": "sha512-7G/yJVzum52B5HOqqbQYX9bJHkN+c4YyZ2AIvEssMHQlbAWOn3iIJjD4sM6ihWsBxuljiTKJovEYlD1K8lCUHw==",
1153
+ "version": "16.0.10",
1154
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.0.10.tgz",
1155
+ "integrity": "sha512-aEZIS4Hh32xdJQbHz121pyuVZniSNoqDVx1yIr2hy+ZwJGipeqnMZBJHyMxv2tiuAXGx6/xpTcQJ6btIiBjgmg==",
1156
1156
  "cpu": [
1157
1157
  "arm64"
1158
1158
  ],
@@ -1166,9 +1166,9 @@
1166
1166
  }
1167
1167
  },
1168
1168
  "node_modules/@next/swc-win32-x64-msvc": {
1169
- "version": "16.0.4",
1170
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.0.4.tgz",
1171
- "integrity": "sha512-0Vy4g8SSeVkuU89g2OFHqGKM4rxsQtihGfenjx2tRckPrge5+gtFnRWGAAwvGXr0ty3twQvcnYjEyOrLHJ4JWA==",
1169
+ "version": "16.0.10",
1170
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.0.10.tgz",
1171
+ "integrity": "sha512-E+njfCoFLb01RAFEnGZn6ERoOqhK1Gl3Lfz1Kjnj0Ulfu7oJbuMyvBKNj/bw8XZnenHDASlygTjZICQW+rYW1Q==",
1172
1172
  "cpu": [
1173
1173
  "x64"
1174
1174
  ],
@@ -4652,12 +4652,12 @@
4652
4652
  "license": "MIT"
4653
4653
  },
4654
4654
  "node_modules/next": {
4655
- "version": "16.0.4",
4656
- "resolved": "https://registry.npmjs.org/next/-/next-16.0.4.tgz",
4657
- "integrity": "sha512-vICcxKusY8qW7QFOzTvnRL1ejz2ClTqDKtm1AcUjm2mPv/lVAdgpGNsftsPRIDJOXOjRQO68i1dM8Lp8GZnqoA==",
4655
+ "version": "16.0.10",
4656
+ "resolved": "https://registry.npmjs.org/next/-/next-16.0.10.tgz",
4657
+ "integrity": "sha512-RtWh5PUgI+vxlV3HdR+IfWA1UUHu0+Ram/JBO4vWB54cVPentCD0e+lxyAYEsDTqGGMg7qpjhKh6dc6aW7W/sA==",
4658
4658
  "license": "MIT",
4659
4659
  "dependencies": {
4660
- "@next/env": "16.0.4",
4660
+ "@next/env": "16.0.10",
4661
4661
  "@swc/helpers": "0.5.15",
4662
4662
  "caniuse-lite": "^1.0.30001579",
4663
4663
  "postcss": "8.4.31",
@@ -4670,14 +4670,14 @@
4670
4670
  "node": ">=20.9.0"
4671
4671
  },
4672
4672
  "optionalDependencies": {
4673
- "@next/swc-darwin-arm64": "16.0.4",
4674
- "@next/swc-darwin-x64": "16.0.4",
4675
- "@next/swc-linux-arm64-gnu": "16.0.4",
4676
- "@next/swc-linux-arm64-musl": "16.0.4",
4677
- "@next/swc-linux-x64-gnu": "16.0.4",
4678
- "@next/swc-linux-x64-musl": "16.0.4",
4679
- "@next/swc-win32-arm64-msvc": "16.0.4",
4680
- "@next/swc-win32-x64-msvc": "16.0.4",
4673
+ "@next/swc-darwin-arm64": "16.0.10",
4674
+ "@next/swc-darwin-x64": "16.0.10",
4675
+ "@next/swc-linux-arm64-gnu": "16.0.10",
4676
+ "@next/swc-linux-arm64-musl": "16.0.10",
4677
+ "@next/swc-linux-x64-gnu": "16.0.10",
4678
+ "@next/swc-linux-x64-musl": "16.0.10",
4679
+ "@next/swc-win32-arm64-msvc": "16.0.10",
4680
+ "@next/swc-win32-x64-msvc": "16.0.10",
4681
4681
  "sharp": "^0.34.4"
4682
4682
  },
4683
4683
  "peerDependencies": {
package/web/package.json CHANGED
@@ -2,15 +2,16 @@
2
2
  "name": "web",
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
+ "type": "module",
5
6
  "scripts": {
6
- "dev": "next dev",
7
+ "dev": "node server.js",
7
8
  "build": "next build",
8
- "start": "next start",
9
- "lint": "eslint"
9
+ "start": "NODE_ENV=production node server.js",
10
+ "lint": "next lint"
10
11
  },
11
12
  "dependencies": {
12
13
  "lucide-react": "^0.555.0",
13
- "next": "16.0.4",
14
+ "next": "^16.0.10",
14
15
  "react": "19.2.0",
15
16
  "react-dom": "19.2.0"
16
17
  },
@@ -25,4 +26,4 @@
25
26
  "tailwindcss": "^3.4.18",
26
27
  "typescript": "^5"
27
28
  }
28
- }
29
+ }
@@ -0,0 +1,30 @@
1
+ import fs from 'fs';
2
+ import { execSync } from 'child_process';
3
+ import path from 'path';
4
+ import { fileURLToPath } from 'url';
5
+
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ const rootDir = path.join(__dirname, '..');
8
+
9
+ console.log('Running smoke tests...');
10
+
11
+ try {
12
+ // 1. Verify package.json type: module
13
+ const packageJsonPath = path.join(rootDir, 'package.json');
14
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
15
+ if (packageJson.type !== 'module') {
16
+ throw new Error('FAIL: package.json must have "type": "module"');
17
+ }
18
+ console.log('āœ… package.json has "type": "module"');
19
+
20
+ // 2. Syntax check server.js
21
+ const serverJsPath = path.join(rootDir, 'server.js');
22
+ execSync(`node -c "${serverJsPath}"`, { stdio: 'inherit' });
23
+ console.log('āœ… server.js syntax check passed');
24
+
25
+ console.log('All smoke tests passed!');
26
+ process.exit(0);
27
+ } catch (error) {
28
+ console.error('āŒ Smoke test failed:', error.message);
29
+ process.exit(1);
30
+ }
package/web/server.js CHANGED
@@ -1,31 +1,176 @@
1
- const { createServer } = require('http');
2
- const { parse } = require('url');
3
- const next = require('next');
1
+ import { createServer } from 'http';
2
+ import { parse } from 'url';
3
+ import next from 'next';
4
+ import express from 'express';
5
+ import session from 'express-session';
6
+ import connectPgSimple from 'connect-pg-simple';
7
+ import pg from 'pg';
8
+
9
+ const pgSession = connectPgSimple(session);
10
+ const { Pool } = pg;
4
11
 
5
12
  const dev = process.env.NODE_ENV !== 'production';
6
13
  const hostname = 'localhost';
7
14
  const port = process.env.PORT || 3000;
8
15
 
16
+ // Initialize PostgreSQL pool for sessions
17
+ const dbUrl = process.env.DEV_WORKFLOW_DB_URL;
18
+ const pool = dbUrl ? new Pool({ connectionString: dbUrl }) : null;
19
+
9
20
  // Initialize Next.js app
10
21
  const app = next({ dev, hostname, port });
11
22
  const handle = app.getRequestHandler();
12
23
 
24
+ // Import auth utilities
25
+ let authenticateUser, getUserById;
26
+ if (pool) {
27
+ import('./lib/auth.js').then(module => {
28
+ authenticateUser = module.authenticateUser;
29
+ getUserById = module.getUserById;
30
+ });
31
+ }
32
+
13
33
  app.prepare().then(() => {
14
- createServer(async (req, res) => {
34
+ const server = express();
35
+
36
+ server.use(express.json());
37
+ server.use(express.urlencoded({ extended: true }));
38
+
39
+ // Session middleware
40
+ if (pool) {
41
+ server.use(
42
+ session({
43
+ store: new pgSession({
44
+ pool,
45
+ tableName: 'session'
46
+ }),
47
+ secret: process.env.SESSION_SECRET || 'dev-workflow-secret-change-in-production',
48
+ resave: false,
49
+ saveUninitialized: false,
50
+ cookie: {
51
+ maxAge: 30 * 24 * 60 * 60 * 1000, // 30 days
52
+ httpOnly: true,
53
+ secure: process.env.NODE_ENV === 'production'
54
+ }
55
+ })
56
+ );
57
+ }
58
+
59
+ // Auth API routes
60
+ server.post('/api/auth/login', async (req, res) => {
61
+ if (!pool || !authenticateUser) {
62
+ return res.status(500).json({ error: 'Database not configured' });
63
+ }
64
+
65
+ const { username, password } = req.body;
66
+
67
+ if (!username || !password) {
68
+ return res.status(400).json({ error: 'Username and password required' });
69
+ }
70
+
15
71
  try {
16
- const parsedUrl = parse(req.url, true);
17
- await handle(req, res, parsedUrl);
18
- } catch (err) {
19
- console.error('Error occurred handling', req.url, err);
20
- res.statusCode = 500;
21
- res.end('internal server error');
22
- }
23
- })
24
- .once('error', (err) => {
25
- console.error(err);
26
- process.exit(1);
27
- })
28
- .listen(port, () => {
29
- console.log(`> Ready on http://${hostname}:${port}`);
72
+ const user = await authenticateUser(pool, username, password);
73
+
74
+ if (!user) {
75
+ return res.status(401).json({ error: 'Invalid credentials' });
76
+ }
77
+
78
+ req.session.userId = user.id;
79
+ req.session.username = user.username;
80
+
81
+ res.json({ success: true, user: { username: user.username, email: user.email } });
82
+ } catch (error) {
83
+ console.error('Login error:', error);
84
+ res.status(500).json({ error: 'Internal server error' });
85
+ }
86
+ });
87
+
88
+ server.post('/api/auth/logout', (req, res) => {
89
+ req.session.destroy((err) => {
90
+ if (err) {
91
+ return res.status(500).json({ error: 'Logout failed' });
92
+ }
93
+ res.json({ success: true });
30
94
  });
95
+ });
96
+
97
+ server.get('/api/auth/me', async (req, res) => {
98
+ if (!req.session || !req.session.userId) {
99
+ return res.status(401).json({ error: 'Not authenticated' });
100
+ }
101
+
102
+ if (!pool || !getUserById) {
103
+ return res.status(500).json({ error: 'Database not configured' });
104
+ }
105
+
106
+ try {
107
+ const user = await getUserById(pool, req.session.userId);
108
+
109
+ if (!user) {
110
+ return res.status(404).json({ error: 'User not found' });
111
+ }
112
+
113
+ res.json({ user: { username: user.username, email: user.email } });
114
+ } catch (error) {
115
+ console.error('Get user error:', error);
116
+ res.status(500).json({ error: 'Internal server error' });
117
+ }
118
+ });
119
+
120
+ // Get workflow history
121
+ server.get('/api/workflow/history', async (req, res) => {
122
+ if (!req.session || !req.session.userId) {
123
+ return res.status(401).json({ error: 'Not authenticated' });
124
+ }
125
+
126
+ if (!pool) {
127
+ return res.status(500).json({ error: 'Database not configured' });
128
+ }
129
+
130
+ try {
131
+ // Get user details to filter history
132
+ // We assume workflow_history.user_id stores the username (based on schema)
133
+ const user = req.session.username; // This should be populated during login
134
+
135
+ let query = `
136
+ SELECT
137
+ id,
138
+ task_type,
139
+ task_description as description,
140
+ commit_message,
141
+ timestamp as completed_at,
142
+ tests_passed,
143
+ documentation_type
144
+ FROM workflow_history
145
+ `;
146
+
147
+ const params = [];
148
+
149
+ // If we have a username, filter by it.
150
+ // Note: DB schema has user_id just as text, assuming it matches username
151
+ if (user) {
152
+ query += ` WHERE user_id = $1 `;
153
+ params.push(user);
154
+ }
155
+
156
+ query += ` ORDER BY timestamp DESC LIMIT 100`;
157
+
158
+ const result = await pool.query(query, params);
159
+
160
+ res.json({ history: result.rows });
161
+ } catch (error) {
162
+ console.error('Get history error:', error);
163
+ res.status(500).json({ error: 'Internal server error' });
164
+ }
165
+ });
166
+
167
+ // Next.js handler for all other routes
168
+ server.all('*', (req, res) => {
169
+ return handle(req, res);
170
+ });
171
+
172
+ server.listen(port, (err) => {
173
+ if (err) throw err;
174
+ console.log(`> Ready on http://${hostname}:${port}`);
175
+ });
31
176
  });
@@ -1,92 +0,0 @@
1
-
2
- import { MysqlAdapter } from "./db/adapters/mysql.js";
3
- import { resolve } from "path";
4
-
5
- const CONNECTION_URL = process.env.DEV_WORKFLOW_DB_URL;
6
-
7
- if (!CONNECTION_URL) {
8
- console.error("āŒ Error: DEV_WORKFLOW_DB_URL environment variable is required.");
9
- console.error("Usage: DEV_WORKFLOW_DB_URL='mysql://user:password@host:port/database' node verify-db-mysql.js");
10
- process.exit(1);
11
- }
12
-
13
- const TEST_USER = "test-verification-user";
14
- const TEST_PROJECT = resolve(process.cwd());
15
-
16
- async function runVerification() {
17
- console.log("šŸ” Starting MySQL Verification...");
18
- console.log(` User ID: ${TEST_USER}`);
19
- console.log(` Project: ${TEST_PROJECT}`);
20
- console.log(` URL: ${CONNECTION_URL.replace(/:[^:@]+@/, ":****@")}`);
21
-
22
- const adapter = new MysqlAdapter({
23
- connectionUrl: CONNECTION_URL
24
- });
25
-
26
- try {
27
- // 1. Connect & Migrate
28
- console.log("\n1. Connecting and Migrating...");
29
- await adapter.connect();
30
- console.log(" āœ… Connected to MySQL");
31
-
32
- // 2. Clear previous test data (optional, but good for cleanliness)
33
- // We won't strictly clear to avoid wiping valid data if user reuses IDs,
34
- // but the test user should be unique enough.
35
-
36
- // 3. Insert History
37
- console.log("\n3. Testing History Insertion...");
38
- const entry = {
39
- taskDescription: "Verification Task",
40
- taskType: "test",
41
- timestamp: new Date().toISOString(),
42
- commitMessage: "test commit"
43
- };
44
- await adapter.insertHistoryEntry(TEST_USER, TEST_PROJECT, entry);
45
- console.log(" āœ… Inserted history entry");
46
-
47
- // 4. Verify History Retrieval
48
- console.log("\n4. Verifying History Retrieval...");
49
- const history = await adapter.getHistoryForUser(TEST_USER, TEST_PROJECT, { pageSize: 1 });
50
- const savedEntry = history.entries[0];
51
-
52
- if (savedEntry && savedEntry.task_description === entry.taskDescription) {
53
- console.log(" āœ… Retrieved history entry matches");
54
- } else {
55
- console.error(" āŒ Retrieved entry mismatch:", savedEntry);
56
- process.exit(1);
57
- }
58
-
59
- // 5. Test State Persistence
60
- console.log("\n5. Testing State Persistence...");
61
- const state = {
62
- currentPhase: "verification",
63
- verified: true,
64
- random: Math.random()
65
- };
66
- await adapter.saveState(TEST_USER, TEST_PROJECT, state);
67
- console.log(" āœ… Saved state");
68
-
69
- // 6. Verify State Retrieval
70
- console.log("\n6. Verifying State Retrieval...");
71
- const retrievedState = await adapter.getState(TEST_USER, TEST_PROJECT);
72
- if (retrievedState && retrievedState.random === state.random) {
73
- console.log(" āœ… Retrieved state matches");
74
- } else {
75
- console.error(" āŒ Retrieved state mismatch:", retrievedState);
76
- process.exit(1);
77
- }
78
-
79
- console.log("\nšŸŽ‰ MySQL Verification SUCCESS!");
80
- process.exit(0);
81
-
82
- } catch (error) {
83
- console.error("\nāŒ Verification FAILED:", error);
84
- process.exit(1);
85
- } finally {
86
- if (adapter.pool) {
87
- await adapter.pool.end();
88
- }
89
- }
90
- }
91
-
92
- runVerification();