mirror of
https://github.com/violettoolssite/CFspider.git
synced 2026-04-05 19:39:01 +08:00
debug: add CLI debug output to diagnose version mismatch (v1.1.3)
This commit is contained in:
@@ -19,6 +19,10 @@ const command = args[0] || 'dev';
|
||||
// 获取包的根目录
|
||||
const packageRoot = path.resolve(__dirname, '..');
|
||||
|
||||
// 调试信息
|
||||
console.log('[DEBUG] __dirname:', __dirname);
|
||||
console.log('[DEBUG] packageRoot:', packageRoot);
|
||||
|
||||
// 检查是否在正确的目录
|
||||
const packageJsonPath = path.join(packageRoot, 'package.json');
|
||||
if (!fs.existsSync(packageJsonPath)) {
|
||||
@@ -26,6 +30,14 @@ if (!fs.existsSync(packageJsonPath)) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// 读取并显示版本
|
||||
try {
|
||||
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
||||
console.log('[DEBUG] package.json version:', pkg.version);
|
||||
} catch (e) {
|
||||
console.error('[DEBUG] Failed to read package.json:', e.message);
|
||||
}
|
||||
|
||||
// 检查依赖是否已安装
|
||||
const nodeModulesPath = path.join(packageRoot, 'node_modules');
|
||||
const esbuildPath = path.join(nodeModulesPath, '.bin', process.platform === 'win32' ? 'esbuild.cmd' : 'esbuild');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cfspider-browser",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"description": "CFspider 智能浏览器 - AI驱动的浏览器,自然语言控制浏览器自动化",
|
||||
"keywords": [
|
||||
"browser",
|
||||
|
||||
Reference in New Issue
Block a user