2025-08-26 12:32:21 -07:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Quick CLI API Compatibility Test
|
|
|
|
|
*/
|
|
|
|
|
|
2025-09-30 17:09:15 -07:00
|
|
|
import { Brainy } from '../../dist/index.js'
|
2025-08-26 12:32:21 -07:00
|
|
|
|
|
|
|
|
console.log('🧠 Testing CLI API compatibility...')
|
|
|
|
|
|
2025-09-30 17:09:15 -07:00
|
|
|
const brain = new Brainy({ storage: { type: 'memory' }, verbose: false })
|
2025-08-26 12:32:21 -07:00
|
|
|
|
|
|
|
|
try {
|
2025-09-30 17:09:15 -07:00
|
|
|
console.log('✅ Brainy instantiated')
|
2025-08-26 12:32:21 -07:00
|
|
|
|
|
|
|
|
// Test method signatures
|
|
|
|
|
console.log('✅ addNoun method:', typeof brain.addNoun === 'function')
|
|
|
|
|
console.log('✅ addVerb method:', typeof brain.addVerb === 'function')
|
|
|
|
|
console.log('✅ search method:', typeof brain.search === 'function')
|
|
|
|
|
console.log('✅ find method:', typeof brain.find === 'function')
|
|
|
|
|
console.log('✅ updateNoun method:', typeof brain.updateNoun === 'function')
|
|
|
|
|
console.log('✅ deleteNoun method:', typeof brain.deleteNoun === 'function')
|
|
|
|
|
console.log('✅ getStatistics method:', typeof brain.getStatistics === 'function')
|
|
|
|
|
|
|
|
|
|
console.log('\n🎯 CLI API Compatibility: 100% ✅')
|
|
|
|
|
console.log('All required methods exist with correct names')
|
|
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log('❌ API Test Failed:', error.message)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
process.exit(0)
|