@devstroupe/devkit-mcp 1.1.1 → 1.1.3
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/dist/integration.test.js +45 -0
- package/package.json +2 -2
package/dist/integration.test.js
CHANGED
|
@@ -37,9 +37,49 @@ const node_test_1 = require("node:test");
|
|
|
37
37
|
const assert = __importStar(require("node:assert"));
|
|
38
38
|
const child_process_1 = require("child_process");
|
|
39
39
|
const path = __importStar(require("path"));
|
|
40
|
+
const fs = __importStar(require("fs-extra"));
|
|
40
41
|
(0, node_test_1.test)('MCP Server Integration Test', async (t) => {
|
|
41
42
|
const serverPath = path.resolve(__dirname, 'index.js');
|
|
42
43
|
const sandboxDir = path.resolve(__dirname, '../../../sandbox-test');
|
|
44
|
+
// Limpar e inicializar o sandbox-test dinamicamente
|
|
45
|
+
try {
|
|
46
|
+
fs.removeSync(sandboxDir);
|
|
47
|
+
}
|
|
48
|
+
catch { }
|
|
49
|
+
fs.ensureDirSync(sandboxDir);
|
|
50
|
+
const rootDir = path.resolve(__dirname, '../../..');
|
|
51
|
+
const angularTemplate = path.join(rootDir, 'boilerplates/angular-template');
|
|
52
|
+
const nestTemplate = path.join(rootDir, 'boilerplates/nest-template');
|
|
53
|
+
const filter = (src) => !src.includes('node_modules') && !src.includes('.angular') && !src.includes('.nest');
|
|
54
|
+
fs.copySync(angularTemplate, path.join(sandboxDir, 'frontend'), { filter });
|
|
55
|
+
fs.copySync(nestTemplate, path.join(sandboxDir, 'backend'), { filter });
|
|
56
|
+
const destAngularNodeModules = path.join(sandboxDir, 'frontend/node_modules');
|
|
57
|
+
const destNestNodeModules = path.join(sandboxDir, 'backend/node_modules');
|
|
58
|
+
try {
|
|
59
|
+
fs.removeSync(destAngularNodeModules);
|
|
60
|
+
}
|
|
61
|
+
catch { }
|
|
62
|
+
try {
|
|
63
|
+
fs.removeSync(destNestNodeModules);
|
|
64
|
+
}
|
|
65
|
+
catch { }
|
|
66
|
+
fs.ensureSymlinkSync(path.join(angularTemplate, 'node_modules'), destAngularNodeModules);
|
|
67
|
+
fs.ensureSymlinkSync(path.join(nestTemplate, 'node_modules'), destNestNodeModules);
|
|
68
|
+
fs.writeFileSync(path.join(sandboxDir, 'devstroupe.config.ts'), `export default {
|
|
69
|
+
projectName: 'Sandbox Test',
|
|
70
|
+
backendPath: './backend',
|
|
71
|
+
frontendPath: './frontend',
|
|
72
|
+
entities: [
|
|
73
|
+
{
|
|
74
|
+
name: 'cabin',
|
|
75
|
+
label: 'Cabines',
|
|
76
|
+
tableName: 'cabins',
|
|
77
|
+
properties: [
|
|
78
|
+
{ name: 'name', type: 'string', required: true, label: 'Nome' }
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
};`, 'utf-8');
|
|
43
83
|
const cp = (0, child_process_1.spawn)('node', [serverPath], {
|
|
44
84
|
cwd: sandboxDir,
|
|
45
85
|
stdio: ['pipe', 'pipe', 'inherit']
|
|
@@ -156,4 +196,9 @@ const path = __importStar(require("path"));
|
|
|
156
196
|
cp.stdin.end();
|
|
157
197
|
cp.kill();
|
|
158
198
|
await onData;
|
|
199
|
+
// Remover sandbox-test
|
|
200
|
+
try {
|
|
201
|
+
fs.removeSync(sandboxDir);
|
|
202
|
+
}
|
|
203
|
+
catch { }
|
|
159
204
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devstroupe/devkit-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "DevsTroupe Development Kit MCP Server — exposes CLI automation as native AI tools via Model Context Protocol",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"fs-extra": "^11.2.0",
|
|
37
|
-
"@devstroupe/devkit-cli": "1.1.
|
|
37
|
+
"@devstroupe/devkit-cli": "1.1.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/fs-extra": "^11.0.4",
|