collabdocchat 1.2.9 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/USAGE.md +2 -0
- package/bin/cli.js +66 -66
- package/install-and-start.bat +2 -0
- package/install-and-start.sh +2 -0
- package/package.json +1 -1
- package/src/pages/user-dashboard.js +1 -2
package/README.md
CHANGED
|
@@ -226,7 +226,15 @@ npm run serve
|
|
|
226
226
|
|
|
227
227
|
## 📝 更新日志
|
|
228
228
|
|
|
229
|
-
### v1.2.
|
|
229
|
+
### v1.2.10 (2026-01-26) - 当前版本 ⭐
|
|
230
|
+
- 🐛 修复 Quill 编辑器导入问题
|
|
231
|
+
- ✨ 页面现在可以正常加载和显示
|
|
232
|
+
- 🎨 优化前端模块导入
|
|
233
|
+
|
|
234
|
+
### v1.2.9 (2026-01-26)
|
|
235
|
+
- 📚 添加详细的 USAGE.md 使用指南
|
|
236
|
+
|
|
237
|
+
### v1.2.8 (2026-01-26)
|
|
230
238
|
- 🔧 修复 devDependencies 安装问题
|
|
231
239
|
- ✨ 自动检测并安装缺失的依赖
|
|
232
240
|
- 🛡️ 添加端口占用检测
|
|
@@ -237,28 +245,20 @@ npm run serve
|
|
|
237
245
|
- 📚 添加详细的 INSTALLATION.md 安装指南
|
|
238
246
|
- 📝 添加 CONTRIBUTING.md 贡献指南
|
|
239
247
|
|
|
240
|
-
### v1.2.6 (2026-01-26)
|
|
241
|
-
- 📝 更新版本日志
|
|
242
|
-
|
|
243
|
-
### v1.2.5 (2026-01-26)
|
|
248
|
+
### v1.2.5-1.2.6 (2026-01-26)
|
|
244
249
|
- 🔧 修复 Windows 下 CLI 启动问题
|
|
245
250
|
- 📚 优化安装和使用说明
|
|
246
|
-
- ✨ 简化启动流程
|
|
247
251
|
|
|
248
|
-
### v1.2.4 (2026-01-26)
|
|
249
|
-
- 🐛 修复浏览器自动打开功能
|
|
250
|
-
|
|
251
|
-
### v1.2.3 (2026-01-26)
|
|
252
|
+
### v1.2.3-1.2.4 (2026-01-26)
|
|
252
253
|
- 📚 添加完整的 README 文档
|
|
254
|
+
- 🐛 修复浏览器自动打开功能
|
|
253
255
|
|
|
254
256
|
### v1.2.2 (2026-01-26)
|
|
255
257
|
- ✅ 首次发布到 npm
|
|
256
|
-
- 🔧 修复 package.json 配置
|
|
257
258
|
|
|
258
259
|
### v1.2.0
|
|
259
260
|
- ✨ 添加任务管理功能
|
|
260
261
|
- 🎨 优化 UI 界面
|
|
261
|
-
- 🐛 修复已知问题
|
|
262
262
|
|
|
263
263
|
### v1.0.0
|
|
264
264
|
- 🎉 首次发布
|
package/USAGE.md
CHANGED
package/bin/cli.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { spawn, exec } from 'child_process';
|
|
4
|
-
import { platform } from 'os';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
import { dirname, join } from 'path';
|
|
7
|
-
import { existsSync } from 'fs';
|
|
8
|
-
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = dirname(__filename);
|
|
11
|
-
const rootDir = join(__dirname, '..');
|
|
12
|
-
const isWindows = platform() === 'win32';
|
|
13
|
-
|
|
14
|
-
console.log('\n🎉 欢迎使用 CollabDocChat!\n');
|
|
15
|
-
console.log('📦 开源的实时协作文档聊天平台\n');
|
|
16
|
-
|
|
17
|
-
// 检查是否在正确的目录
|
|
18
|
-
const serverPath = join(rootDir, 'server', 'index.js');
|
|
19
|
-
if (!existsSync(serverPath)) {
|
|
20
|
-
console.error('❌ 错误:找不到服务器文件');
|
|
21
|
-
console.error(' 这个包需要在安装后的目录中运行');
|
|
22
|
-
console.error('\n💡 推荐使用方式:');
|
|
23
|
-
console.error(' 1. npm install collabdocchat');
|
|
24
|
-
console.error(' 2. cd node_modules/collabdocchat');
|
|
25
|
-
console.error(' 3. npm start');
|
|
26
|
-
console.error('\n 或者直接运行: npm start (在安装了 collabdocchat 的项目中)');
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
console.log('🚀 正在启动应用...\n');
|
|
31
|
-
|
|
32
|
-
// 使用 npm start 脚本来启动
|
|
33
|
-
const npmCmd = isWindows ? 'npm.cmd' : 'npm';
|
|
34
|
-
const startProcess = spawn(npmCmd, ['start'], {
|
|
35
|
-
cwd: rootDir,
|
|
36
|
-
stdio: 'inherit',
|
|
37
|
-
shell: true
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
startProcess.on('error', (error) => {
|
|
41
|
-
console.error('❌ 启动失败:', error.message);
|
|
42
|
-
console.error('\n💡 请尝试手动启动:');
|
|
43
|
-
console.error(` cd ${rootDir}`);
|
|
44
|
-
console.error(' npm start');
|
|
45
|
-
process.exit(1);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
startProcess.on('exit', (code) => {
|
|
49
|
-
if (code !== 0) {
|
|
50
|
-
console.log(`\n⚠️ 进程退出,代码: ${code}`);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// 处理退出信号
|
|
55
|
-
process.on('SIGINT', () => {
|
|
56
|
-
console.log('\n\n👋 正在关闭应用...');
|
|
57
|
-
startProcess.kill('SIGINT');
|
|
58
|
-
process.exit(0);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
process.on('SIGTERM', () => {
|
|
62
|
-
console.log('\n\n👋 正在关闭应用...');
|
|
63
|
-
startProcess.kill('SIGTERM');
|
|
64
|
-
process.exit(0);
|
|
65
|
-
});
|
|
66
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn, exec } from 'child_process';
|
|
4
|
+
import { platform } from 'os';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import { dirname, join } from 'path';
|
|
7
|
+
import { existsSync } from 'fs';
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
const rootDir = join(__dirname, '..');
|
|
12
|
+
const isWindows = platform() === 'win32';
|
|
13
|
+
|
|
14
|
+
console.log('\n🎉 欢迎使用 CollabDocChat!\n');
|
|
15
|
+
console.log('📦 开源的实时协作文档聊天平台\n');
|
|
16
|
+
|
|
17
|
+
// 检查是否在正确的目录
|
|
18
|
+
const serverPath = join(rootDir, 'server', 'index.js');
|
|
19
|
+
if (!existsSync(serverPath)) {
|
|
20
|
+
console.error('❌ 错误:找不到服务器文件');
|
|
21
|
+
console.error(' 这个包需要在安装后的目录中运行');
|
|
22
|
+
console.error('\n💡 推荐使用方式:');
|
|
23
|
+
console.error(' 1. npm install collabdocchat');
|
|
24
|
+
console.error(' 2. cd node_modules/collabdocchat');
|
|
25
|
+
console.error(' 3. npm start');
|
|
26
|
+
console.error('\n 或者直接运行: npm start (在安装了 collabdocchat 的项目中)');
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
console.log('🚀 正在启动应用...\n');
|
|
31
|
+
|
|
32
|
+
// 使用 npm start 脚本来启动
|
|
33
|
+
const npmCmd = isWindows ? 'npm.cmd' : 'npm';
|
|
34
|
+
const startProcess = spawn(npmCmd, ['start'], {
|
|
35
|
+
cwd: rootDir,
|
|
36
|
+
stdio: 'inherit',
|
|
37
|
+
shell: true
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
startProcess.on('error', (error) => {
|
|
41
|
+
console.error('❌ 启动失败:', error.message);
|
|
42
|
+
console.error('\n💡 请尝试手动启动:');
|
|
43
|
+
console.error(` cd ${rootDir}`);
|
|
44
|
+
console.error(' npm start');
|
|
45
|
+
process.exit(1);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
startProcess.on('exit', (code) => {
|
|
49
|
+
if (code !== 0) {
|
|
50
|
+
console.log(`\n⚠️ 进程退出,代码: ${code}`);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// 处理退出信号
|
|
55
|
+
process.on('SIGINT', () => {
|
|
56
|
+
console.log('\n\n👋 正在关闭应用...');
|
|
57
|
+
startProcess.kill('SIGINT');
|
|
58
|
+
process.exit(0);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
process.on('SIGTERM', () => {
|
|
62
|
+
console.log('\n\n👋 正在关闭应用...');
|
|
63
|
+
startProcess.kill('SIGTERM');
|
|
64
|
+
process.exit(0);
|
|
65
|
+
});
|
|
66
|
+
|
package/package.json
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ApiService } from '../services/api.js';
|
|
2
2
|
import { AuthService } from '../services/auth.js';
|
|
3
|
-
import Quill from 'quill';
|
|
4
|
-
import 'quill/dist/quill.snow.css';
|
|
5
3
|
import 'emoji-picker-element';
|
|
6
4
|
|
|
7
5
|
export function renderUserDashboard(user, wsService) {
|
|
@@ -344,6 +342,7 @@ export function renderUserDashboard(user, wsService) {
|
|
|
344
342
|
`;
|
|
345
343
|
|
|
346
344
|
// 初始化 Quill 编辑器
|
|
345
|
+
const Quill = window.Quill;
|
|
347
346
|
const quill = new Quill('#editor', {
|
|
348
347
|
theme: 'snow',
|
|
349
348
|
modules: {
|