@simonecoelhosfo/optimizely-mcp-server
Version:
Optimizely MCP Server for AI assistants with integrated CLI tools
45 lines (34 loc) ⢠1.46 kB
JavaScript
/**
* Quick Cache Sync - JavaScript bypass for TypeScript compilation issues
* This is a temporary workaround to get cache sync working while TypeScript issues are resolved
*/
const { execSync } = require('child_process');
console.log('š Starting quick cache sync...');
try {
// Try to run the enhanced sync with --no-check to bypass TypeScript
console.log('š„ Running cache sync with TypeScript checking disabled...');
const result = execSync('npx tsx --no-check scripts/cache-sync-enhanced.ts', {
stdio: 'inherit',
encoding: 'utf8'
});
console.log('ā
Cache sync completed successfully!');
} catch (error) {
console.log('ā Enhanced sync failed, trying basic sync...');
try {
// Fallback to basic cache sync
const basicResult = execSync('npm run cache-sync', {
stdio: 'inherit',
encoding: 'utf8'
});
console.log('ā
Basic cache sync completed!');
} catch (basicError) {
console.error('ā All sync methods failed:', basicError.message);
console.log('\nš” Please check your Optimizely API token and network connection.');
process.exit(1);
}
}
console.log('\nš Next steps:');
console.log('1. Check data/optimizely-cache.db for updated rules data');
console.log('2. Copy database to test folder for analytics validation');
console.log('3. Run validation tests to check for improvements');