feat: Complete overhaul to enhanced documentation-only MCP server
- Removed all workflow execution capabilities per user requirements - Implemented enhanced documentation extraction with operations and API mappings - Fixed credential code extraction for all nodes - Fixed package info extraction (name and version) - Enhanced operations parser to handle n8n markdown format - Fixed documentation search to prioritize app nodes over trigger nodes - Comprehensive test coverage for Slack node extraction - All node information now includes: - Complete operations list (42 for Slack) - API method mappings with documentation URLs - Source code and credential definitions - Package metadata - Related resources and templates 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
30
tests/test-package-info.js
Normal file
30
tests/test-package-info.js
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const { NodeSourceExtractor } = require('../dist/utils/node-source-extractor');
|
||||
|
||||
async function testPackageInfo() {
|
||||
console.log('🧪 Testing Package Info Extraction\n');
|
||||
|
||||
const extractor = new NodeSourceExtractor();
|
||||
|
||||
const testNodes = [
|
||||
'n8n-nodes-base.Slack',
|
||||
'n8n-nodes-base.HttpRequest',
|
||||
'n8n-nodes-base.Function'
|
||||
];
|
||||
|
||||
for (const nodeType of testNodes) {
|
||||
console.log(`\n📦 Testing ${nodeType}:`);
|
||||
try {
|
||||
const result = await extractor.extractNodeSource(nodeType);
|
||||
console.log(` - Source Code: ${result.sourceCode ? '✅' : '❌'} (${result.sourceCode?.length || 0} bytes)`);
|
||||
console.log(` - Credential Code: ${result.credentialCode ? '✅' : '❌'} (${result.credentialCode?.length || 0} bytes)`);
|
||||
console.log(` - Package Name: ${result.packageInfo?.name || '❌ undefined'}`);
|
||||
console.log(` - Package Version: ${result.packageInfo?.version || '❌ undefined'}`);
|
||||
} catch (error) {
|
||||
console.log(` ❌ Error: ${error.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
testPackageInfo().catch(console.error);
|
||||
Reference in New Issue
Block a user