@dyno181cm.nexsoft/zentao_mcp 1.0.1 → 1.0.2
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 +1 -1
- package/build/testApi.js +0 -31
package/package.json
CHANGED
package/build/testApi.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ZentaoClient } from './zentaoClient.js';
|
|
2
|
-
import * as dotenv from 'dotenv';
|
|
3
|
-
dotenv.config();
|
|
4
|
-
async function main() {
|
|
5
|
-
try {
|
|
6
|
-
const client = new ZentaoClient();
|
|
7
|
-
console.log('Logging in to Zentao...');
|
|
8
|
-
await client.login();
|
|
9
|
-
console.log('Successfully logged in.');
|
|
10
|
-
console.log('\n--- Fetching execution tasks (Execution ID: 2) ---');
|
|
11
|
-
try {
|
|
12
|
-
const tasks = await client.getExecutionTasks(2, 1, 5);
|
|
13
|
-
console.log('Tasks result:', JSON.stringify(tasks, null, 2));
|
|
14
|
-
}
|
|
15
|
-
catch (e) {
|
|
16
|
-
console.error('Error fetching tasks:', e.response?.data || e.message);
|
|
17
|
-
}
|
|
18
|
-
console.log('\n--- Fetching bug details (Bug ID: 2) ---');
|
|
19
|
-
try {
|
|
20
|
-
const bug = await client.getBugDetails(2);
|
|
21
|
-
console.log('Bug details:', JSON.stringify(bug, null, 2));
|
|
22
|
-
}
|
|
23
|
-
catch (e) {
|
|
24
|
-
console.error('Error fetching bug:', e.response?.data || e.message);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
console.error('Fatal Error:', error.message || error);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
main();
|