@testomatio/mcp 1.0.6 → 1.0.7
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/index.js +12 -3
- package/package.json +5 -2
package/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ListToolsRequestSchema,
|
|
8
8
|
} from '@modelcontextprotocol/sdk/types.js';
|
|
9
9
|
import { program } from 'commander';
|
|
10
|
+
import { fileURLToPath } from 'url';
|
|
10
11
|
|
|
11
12
|
function normalizeString(value) {
|
|
12
13
|
return typeof value === 'string' ? value.trim() : value;
|
|
@@ -1338,7 +1339,15 @@ async function main() {
|
|
|
1338
1339
|
}
|
|
1339
1340
|
}
|
|
1340
1341
|
|
|
1341
|
-
//
|
|
1342
|
-
|
|
1343
|
-
|
|
1342
|
+
// Run main() when executed directly or as a bin script
|
|
1343
|
+
// Don't run when imported as a module for testing
|
|
1344
|
+
if (import.meta.url.startsWith('file://') && process.argv[1]) {
|
|
1345
|
+
const modulePath = fileURLToPath(import.meta.url);
|
|
1346
|
+
const isDirectExecution = process.argv[1].includes('index.js') ||
|
|
1347
|
+
process.argv[1] === modulePath ||
|
|
1348
|
+
process.argv[1].endsWith('/testomatio-mcp');
|
|
1349
|
+
|
|
1350
|
+
if (isDirectExecution) {
|
|
1351
|
+
main().catch(console.error);
|
|
1352
|
+
}
|
|
1344
1353
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testomatio/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Model Context Protocol server for Testomatio API",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -13,11 +13,14 @@
|
|
|
13
13
|
"test": "node --experimental-vm-modules node_modules/.bin/jest",
|
|
14
14
|
"test:unit": "node --experimental-vm-modules node_modules/.bin/jest",
|
|
15
15
|
"test:integration": "node --experimental-vm-modules node_modules/.bin/jest --config jest.integration.config.js",
|
|
16
|
+
"test:e2e": "node --experimental-vm-modules node_modules/.bin/jest --config jest.e2e.config.js",
|
|
16
17
|
"test:watch": "node --experimental-vm-modules node_modules/.bin/jest --watch",
|
|
17
18
|
"test:integration:watch": "node --experimental-vm-modules node_modules/.bin/jest --config jest.integration.config.js --watch",
|
|
19
|
+
"test:e2e:watch": "node --experimental-vm-modules node_modules/.bin/jest --config jest.e2e.config.js --watch",
|
|
18
20
|
"test:coverage": "node --experimental-vm-modules node_modules/.bin/jest --coverage",
|
|
19
21
|
"test:coverage:integration": "node --experimental-vm-modules node_modules/.bin/jest --config jest.integration.config.js --coverage",
|
|
20
|
-
"test:
|
|
22
|
+
"test:coverage:e2e": "node --experimental-vm-modules node_modules/.bin/jest --config jest.e2e.config.js --coverage",
|
|
23
|
+
"test:all": "npm run test:unit && npm run test:integration && npm run test:e2e"
|
|
21
24
|
},
|
|
22
25
|
"keywords": [
|
|
23
26
|
"testomatio",
|