MCPcopy Create free account
hub / github.com/chokcoco/iCSS / verifyInstallation

Function verifyInstallation

MCP/bin/install.js:88–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87// 验证安装
88function verifyInstallation() {
89 try {
90 const packagePath = getPackagePath();
91 const serverPath = path.join(packagePath, 'server.js');
92 const dbPath = path.join(packagePath, 'data', 'icss.db');
93
94 console.log('\n🔍 Verifying installation...');
95
96 if (!fs.existsSync(serverPath)) {
97 throw new Error(`Server file not found: ${serverPath}`);
98 }
99 console.log('✅ Server file exists');
100
101 if (!fs.existsSync(dbPath)) {
102 console.log('⚠️ Database not found, will be created on first run');
103 } else {
104 console.log('✅ Database file exists');
105 }
106
107 // 检查新增的脚本文件
108 const inspirationScript = path.join(packagePath, 'scripts', 'fetch-inspiration.js');
109 if (fs.existsSync(inspirationScript)) {
110 console.log('✅ CSS-Inspiration integration script exists');
111 }
112
113 const testInspiration = path.join(packagePath, 'test-inspiration.js');
114 if (fs.existsSync(testInspiration)) {
115 console.log('✅ CSS-Inspiration test script exists');
116 }
117
118 console.log('✅ Installation verified');
119
120 } catch (error) {
121 console.error('❌ Installation verification failed:', error.message);
122 throw error;
123 }
124}
125
126// 显示使用说明
127function showUsageInstructions(configFile) {

Callers 1

mainFunction · 0.85

Calls 1

getPackagePathFunction · 0.85

Tested by

no test coverage detected