@programinglive/dev-workflow-mcp-server 1.9.1 ā 1.11.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/README.md +311 -173
- package/factory-client.js +636 -0
- package/git-facade.js +35 -0
- package/index.js +4 -30
- package/package.json +14 -18
- package/scripts/setup-test-dbs.sh +61 -0
- package/scripts/test-db-adapters.sh +71 -0
- package/scripts/verify-bundle.mjs +92 -0
- package/session-keeper.js +72 -0
- package/tools/definitions.js +124 -0
- package/tools/handler-modules/factory-handlers.js +288 -0
- package/tools/handler-modules/index.js +11 -0
- package/tools/handler-modules/status-handlers.js +22 -2
- package/tools/handler-modules/workflow-handlers.js +32 -3
- package/vite.config.js +6 -0
- package/workflow-state.js +166 -2
- package/scripts/test-auth-flow.js +0 -75
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import fetch from 'node-fetch';
|
|
2
|
-
|
|
3
|
-
const API_BASE_URL = 'https://hollywood-andrew-cycle-genre.trycloudflare.com';
|
|
4
|
-
const USERNAME = 'programinglive';
|
|
5
|
-
const PASSWORD = 'mcpdevserver';
|
|
6
|
-
|
|
7
|
-
async function testAuthFlow() {
|
|
8
|
-
console.log('š Starting Auth Flow Test...');
|
|
9
|
-
console.log(`Target: ${API_BASE_URL}\n`);
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
// 1. Login
|
|
13
|
-
console.log('1ļøā£ Attempting Login...');
|
|
14
|
-
const loginRes = await fetch(`${API_BASE_URL}/api/auth/login`, {
|
|
15
|
-
method: 'POST',
|
|
16
|
-
headers: { 'Content-Type': 'application/json' },
|
|
17
|
-
body: JSON.stringify({ username: USERNAME, password: PASSWORD }),
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
console.log(` Status: ${loginRes.status}`);
|
|
21
|
-
if (!loginRes.ok) {
|
|
22
|
-
throw new Error(`Login failed: ${loginRes.statusText}`);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const loginData = await loginRes.json();
|
|
26
|
-
const token = loginData.token;
|
|
27
|
-
|
|
28
|
-
if (token) {
|
|
29
|
-
console.log(' ā
Login Successful! JWT Token received.');
|
|
30
|
-
console.log(` Token: ${token.substring(0, 20)}...`);
|
|
31
|
-
} else {
|
|
32
|
-
console.log(' ā ļø Login successful but NO TOKEN returned (Legacy Session mode?)');
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// 2. Access Protected Route (GET /me)
|
|
36
|
-
console.log('\n2ļøā£ Verifying Session/Token (GET /api/auth/me)...');
|
|
37
|
-
const headers = {};
|
|
38
|
-
if (token) {
|
|
39
|
-
headers['Authorization'] = `Bearer ${token}`;
|
|
40
|
-
console.log(' Using Authorization: Bearer header');
|
|
41
|
-
} else {
|
|
42
|
-
console.log(' Using Cookies (if any)');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const meRes = await fetch(`${API_BASE_URL}/api/auth/me`, {
|
|
46
|
-
headers,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
console.log(` Status: ${meRes.status}`);
|
|
50
|
-
if (meRes.ok) {
|
|
51
|
-
const meData = await meRes.json();
|
|
52
|
-
console.log(` ā
Authorized! User: ${meData.username} (${meData.email})`);
|
|
53
|
-
} else {
|
|
54
|
-
console.error(' ā Authorization Failed!');
|
|
55
|
-
console.error(await meRes.text());
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// 3. Access History (GET /api/history)
|
|
59
|
-
console.log('\n3ļøā£ Fetching History...');
|
|
60
|
-
const historyRes = await fetch(`${API_BASE_URL}/api/history`, { headers });
|
|
61
|
-
console.log(` Status: ${historyRes.status}`);
|
|
62
|
-
|
|
63
|
-
if (historyRes.ok) {
|
|
64
|
-
const historyData = await historyRes.json();
|
|
65
|
-
console.log(` ā
History fetched! Count: ${historyData.history ? historyData.history.length : 0}`);
|
|
66
|
-
} else {
|
|
67
|
-
console.log(' ā History fetch failed.');
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
} catch (error) {
|
|
71
|
-
console.error('\nā Test Failed:', error.message);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
testAuthFlow();
|