openlearn-next 0.1.4 → 0.1.6
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 +16 -5
- package/dist/plugins/ext-ai-quiz-pro.zip +0 -0
- package/dist/plugins/ext-hello-world.zip +0 -0
- package/dist/plugins/ext-memo.zip +0 -0
- package/dist/plugins/ext-mindmap-assistant.zip +0 -0
- package/dist/plugins/ext-quiz-generator.zip +0 -0
- package/dist/plugins/ext-raffle-vote.zip +0 -0
- package/dist/plugins/ext-roll-call.zip +0 -0
- package/dist/server.cjs +11 -2
- package/package.json +39 -35
package/README.md
CHANGED
|
@@ -11,14 +11,23 @@
|
|
|
11
11
|
|
|
12
12
|
## 快速开始
|
|
13
13
|
|
|
14
|
-
### 通过
|
|
14
|
+
### 通过 npm 安装运行
|
|
15
15
|
|
|
16
|
+
```bash
|
|
17
|
+
# 全局安装
|
|
18
|
+
npm install -g openlearn-next
|
|
19
|
+
|
|
20
|
+
# 启动
|
|
21
|
+
openlearn-next
|
|
22
|
+
|
|
23
|
+
# 更新到最新版
|
|
24
|
+
npm update -g openlearn-next
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### 或通过 npx 一键启动
|
|
16
28
|
```bash
|
|
17
29
|
# 首次会自动下载安装,无需 clone 项目
|
|
18
|
-
export GEMINI_API_KEY=你的密钥
|
|
19
|
-
npx openlearn-next
|
|
20
30
|
|
|
21
|
-
# 可选参数
|
|
22
31
|
npx openlearn-next -p 3000 # 自定义端口(默认 9000)
|
|
23
32
|
OPENLEARN_DB_PATH=./my.db npx openlearn-next # 自定义数据库路径(默认 ~/openlearn-next/data.db)
|
|
24
33
|
```
|
|
@@ -151,7 +160,9 @@ ext-exam.zip
|
|
|
151
160
|
|
|
152
161
|
| 命令 | 说明 |
|
|
153
162
|
|------|------|
|
|
154
|
-
| `
|
|
163
|
+
| `npm install -g openlearn-next` | 全局安装 |
|
|
164
|
+
| `npx openlearn-next` | 一键运行(免安装) |
|
|
165
|
+
| `npm update -g openlearn-next` | 更新到最新版 |
|
|
155
166
|
| `npm run dev` | 启动开发服务 |
|
|
156
167
|
| `npm run build` | 生产构建(Vite + esbuild) |
|
|
157
168
|
| `npm start` | 运行生产构建 |
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/server.cjs
CHANGED
|
@@ -14209,7 +14209,7 @@ ${examsText}
|
|
|
14209
14209
|
});
|
|
14210
14210
|
app.use(vite.middlewares);
|
|
14211
14211
|
} else {
|
|
14212
|
-
const distPath = import_path7.default.join(process.cwd(), "dist");
|
|
14212
|
+
const distPath = __dirname || import_path7.default.join(process.cwd(), "dist");
|
|
14213
14213
|
app.use(import_express.default.static(distPath));
|
|
14214
14214
|
app.get("*", (req, res) => {
|
|
14215
14215
|
res.sendFile(import_path7.default.join(distPath, "index.html"));
|
|
@@ -14251,7 +14251,16 @@ ${examsText}
|
|
|
14251
14251
|
});
|
|
14252
14252
|
});
|
|
14253
14253
|
httpServer.listen(PORT, "0.0.0.0", () => {
|
|
14254
|
-
|
|
14254
|
+
const url = `http://localhost:${PORT}`;
|
|
14255
|
+
const OSC = "\x1B]8;;";
|
|
14256
|
+
const ST = "\x1B\\";
|
|
14257
|
+
const reset = "\x1B[0m";
|
|
14258
|
+
const bold = "\x1B[1m";
|
|
14259
|
+
const green = "\x1B[32m";
|
|
14260
|
+
const cyan = "\x1B[36m";
|
|
14261
|
+
console.log(`
|
|
14262
|
+
${bold}${green}Educational OS Kernel${reset} ready at ${bold}${cyan}${OSC}${url}${ST}http://localhost:${PORT}${OSC}${ST}${reset}
|
|
14263
|
+
`);
|
|
14255
14264
|
});
|
|
14256
14265
|
}
|
|
14257
14266
|
if (process.argv[1]?.endsWith("server.cjs") || process.argv[1]?.endsWith("server.ts")) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openlearn-next",
|
|
3
|
+
"version": "0.1.6",
|
|
3
4
|
"private": false,
|
|
4
|
-
"
|
|
5
|
+
"description": "A plugin-driven Educational OS / LMS platform with AI agent teaching assistant",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"ai-agent",
|
|
8
|
+
"courseware",
|
|
9
|
+
"education",
|
|
10
|
+
"lms",
|
|
11
|
+
"openlearn",
|
|
12
|
+
"plugin",
|
|
13
|
+
"teaching",
|
|
14
|
+
"whiteboard"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"author": "OpenLearn Team",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/openlearn/openlearnv2"
|
|
21
|
+
},
|
|
22
|
+
"bin": {
|
|
23
|
+
"openlearn-next": "cli.mjs"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist/index.html",
|
|
27
|
+
"dist/server.cjs",
|
|
28
|
+
"dist/assets/",
|
|
29
|
+
"dist/plugins/",
|
|
30
|
+
"cli.mjs",
|
|
31
|
+
"package.json",
|
|
32
|
+
"README.md"
|
|
33
|
+
],
|
|
5
34
|
"type": "module",
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"registry": "https://registry.npmjs.org/"
|
|
38
|
+
},
|
|
6
39
|
"scripts": {
|
|
7
40
|
"dev": "npx tsx --no-cache server.ts",
|
|
8
41
|
"build": "vite build && node scripts/build-plugins.mjs && esbuild server.ts --bundle --platform=node --format=cjs --packages=external --sourcemap --outfile=dist/server.cjs",
|
|
@@ -47,13 +80,14 @@
|
|
|
47
80
|
"socket.io": "^4.8.3",
|
|
48
81
|
"socket.io-client": "^4.8.3",
|
|
49
82
|
"uuid": "^14.0.0",
|
|
83
|
+
"vite": "^6.2.3",
|
|
50
84
|
"xlsx": "^0.18.5",
|
|
51
85
|
"xss": "^1.0.15",
|
|
52
86
|
"zod": "^4.4.3",
|
|
53
|
-
"zustand": "^5.0.14"
|
|
54
|
-
"vite": "^6.2.3"
|
|
87
|
+
"zustand": "^5.0.14"
|
|
55
88
|
},
|
|
56
89
|
"devDependencies": {
|
|
90
|
+
"@tailwindcss/vite": "^4.1.14",
|
|
57
91
|
"@types/bcryptjs": "^2.4.6",
|
|
58
92
|
"@types/better-sqlite3": "^7.6.13",
|
|
59
93
|
"@types/express": "^4.17.21",
|
|
@@ -63,6 +97,7 @@
|
|
|
63
97
|
"@types/xlsx": "^0.0.35",
|
|
64
98
|
"@typescript-eslint/eslint-plugin": "^8.62.0",
|
|
65
99
|
"@typescript-eslint/parser": "^8.62.0",
|
|
100
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
66
101
|
"autoprefixer": "^10.4.21",
|
|
67
102
|
"esbuild": "^0.25.0",
|
|
68
103
|
"eslint": "^10.5.0",
|
|
@@ -73,37 +108,6 @@
|
|
|
73
108
|
"tailwindcss": "^4.1.14",
|
|
74
109
|
"tsx": "^4.21.0",
|
|
75
110
|
"typescript": "~5.8.2",
|
|
76
|
-
"vitest": "^4.1.9"
|
|
77
|
-
"@tailwindcss/vite": "^4.1.14",
|
|
78
|
-
"@vitejs/plugin-react": "^5.0.4"
|
|
79
|
-
},
|
|
80
|
-
"bin": {
|
|
81
|
-
"openlearn-next": "cli.mjs"
|
|
82
|
-
},
|
|
83
|
-
"files": [
|
|
84
|
-
"dist/index.html",
|
|
85
|
-
"dist/server.cjs",
|
|
86
|
-
"dist/assets/",
|
|
87
|
-
"dist/plugins/",
|
|
88
|
-
"cli.mjs",
|
|
89
|
-
"package.json",
|
|
90
|
-
"README.md"
|
|
91
|
-
],
|
|
92
|
-
"description": "A plugin-driven Educational OS / LMS platform with AI agent teaching assistant",
|
|
93
|
-
"keywords": [
|
|
94
|
-
"lms",
|
|
95
|
-
"education",
|
|
96
|
-
"plugin",
|
|
97
|
-
"teaching",
|
|
98
|
-
"ai-agent",
|
|
99
|
-
"whiteboard",
|
|
100
|
-
"courseware",
|
|
101
|
-
"openlearn"
|
|
102
|
-
],
|
|
103
|
-
"license": "MIT",
|
|
104
|
-
"author": "OpenLearn Team",
|
|
105
|
-
"repository": {
|
|
106
|
-
"type": "git",
|
|
107
|
-
"url": "https://github.com/openlearn/openlearnv2"
|
|
111
|
+
"vitest": "^4.1.9"
|
|
108
112
|
}
|
|
109
113
|
}
|