openlearn-next 0.3.7 → 0.3.9
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/cli-data.mjs +252 -0
- package/cli-doctor.mjs +189 -0
- package/cli.mjs +145 -17
- package/dist/assets/{BatchPickerModal-7SGYP69j.js → BatchPickerModal-C7hweQi7.js} +1 -1
- package/dist/assets/{ClassesView-DlykFThl.js → ClassesView-f7h7q1me.js} +1 -1
- package/dist/assets/{CloudDriveModal-Bu8HsM7n.js → CloudDriveModal-y1cqaYjU.js} +1 -1
- package/dist/assets/{CourseManagement-C780bMgl.js → CourseManagement-Bwfdk7Hi.js} +1 -1
- package/dist/assets/{CourseWizardModal-DFQqYI2e.js → CourseWizardModal-DwKB919Y.js} +1 -1
- package/dist/assets/{Dashboard-DZS7rPzE.js → Dashboard-7ElGQEot.js} +1 -1
- package/dist/assets/{ExportWeightModal-BmHMQzDA.js → ExportWeightModal-Dor_2k5X.js} +1 -1
- package/dist/assets/{HelpView-DNBtzj9s.js → HelpView-Blq21AX9.js} +1 -1
- package/dist/assets/{ImportLessonsModal-D98bqG93.js → ImportLessonsModal-BNb6POIc.js} +1 -1
- package/dist/assets/{InteractiveCoursewareViewer-Bu5lBr1Z.js → InteractiveCoursewareViewer-DZQNSStZ.js} +1 -1
- package/dist/assets/{InteractiveWhiteboard-BYQ-nyrj.js → InteractiveWhiteboard-B-6-PHls.js} +1 -1
- package/dist/assets/{LazyCourseware-DhgJCf1I.js → LazyCourseware-YQTwc8Xc.js} +1 -1
- package/dist/assets/{LazyWhiteboard-C1sVfdFD.js → LazyWhiteboard-DNwlH8kJ.js} +1 -1
- package/dist/assets/{LessonEditorView-HuuFFnNJ.js → LessonEditorView-Biw7dyfp.js} +1 -1
- package/dist/assets/{LiveClassroomView-BRGIGTze.js → LiveClassroomView-D2ZyINSZ.js} +1 -1
- package/dist/assets/{NotificationDetailModal-Bs5EVWer.js → NotificationDetailModal-TJSWdZgO.js} +1 -1
- package/dist/assets/{PluginView-BQj-2SI8.js → PluginView-B2m35ykl.js} +1 -1
- package/dist/assets/{QuizGeneratorModal-BYaKf7LZ.js → QuizGeneratorModal-XNW646aZ.js} +1 -1
- package/dist/assets/{StudentAssignmentView-BhvuQKZs.js → StudentAssignmentView-C7qnbBVV.js} +1 -1
- package/dist/assets/{StudentLessonView-B8IfZguN.js → StudentLessonView-DItUU7Zd.js} +1 -1
- package/dist/assets/{StudentPreviewModal-CQUH7R89.js → StudentPreviewModal-CjxvwHUc.js} +1 -1
- package/dist/assets/{StudentView-C5iJdzhc.js → StudentView-Bg6tAP5x.js} +1 -1
- package/dist/assets/{SystemResourceLibraryModal-DiUpZ3yP.js → SystemResourceLibraryModal-Cf2XJ6sf.js} +1 -1
- package/dist/assets/{TeacherView-e-0NyEqE.js → TeacherView-Baq66mut.js} +1 -1
- package/dist/assets/{index-CV2NRMHT.js → index-B7B4Vq2l.js} +3 -3
- package/dist/assets/{index-DnBjcpig.js → index-KP_ep5bf.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/server.cjs +59 -5
- package/package.json +3 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B-YxO39A.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as e}from"./vendor-pdf-Cp-cYteE.js";import{r as t}from"./vendor-react-0Lg0vA-4.js";const i=t.lazy(()=>e(()=>import("./InteractiveCoursewareViewer-
|
|
2
|
+
import{_ as e}from"./vendor-pdf-Cp-cYteE.js";import{r as t}from"./vendor-react-0Lg0vA-4.js";const i=t.lazy(()=>e(()=>import("./InteractiveCoursewareViewer-DZQNSStZ.js"),__vite__mapDeps([0])).then(r=>({default:r.InteractiveCoursewareViewer})));export{i as CoursewareViewer};
|
package/dist/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
</script>
|
|
18
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
+
<script type="module" crossorigin src="/assets/index-B7B4Vq2l.js"></script>
|
|
19
19
|
<link rel="stylesheet" crossorigin href="/assets/index-B-YxO39A.css">
|
|
20
20
|
</head>
|
|
21
21
|
<body>
|
package/dist/server.cjs
CHANGED
|
@@ -2720,6 +2720,12 @@ parentPort.on('message', async function(msg) {
|
|
|
2720
2720
|
if (!svc) throw new Error('No provider registered for token: ' + tokenName);
|
|
2721
2721
|
if (tokenName === '@openlearn/core:IDatabase') {
|
|
2722
2722
|
return {
|
|
2723
|
+
// \u4E3B\u4FA7 exec RPC \u5DF2\u8FC7 assertDatabaseAccessAllowed \u5B88\u536B\uFF08DDL \u547D\u540D\u7A7A\u95F4 + \u6838\u5FC3\u8868\u9ED1\u540D\u5355\uFF09\uFF0C
|
|
2724
|
+
// \u8FD9\u91CC\u8865\u9F50\u8F6C\u53D1\uFF0C\u907F\u514D worker \u63D2\u4EF6\u8C03\u7528 exec \u65F6\u62A5 "rawDb.exec is not a function"\u3002
|
|
2725
|
+
// \u6CE8\u610F\u8FD4\u56DE Promise\uFF08\u5F02\u6B65 RPC\uFF09\uFF0C\u4E0E prepare* \u4E00\u81F4\u3002
|
|
2726
|
+
exec: function(sql) {
|
|
2727
|
+
return svc.exec(sql);
|
|
2728
|
+
},
|
|
2723
2729
|
prepare: function(sql) {
|
|
2724
2730
|
return {
|
|
2725
2731
|
run: function() {
|
|
@@ -3338,6 +3344,8 @@ module.exports = __toCommonJS(server_exports);
|
|
|
3338
3344
|
var import_express3 = __toESM(require("express"), 1);
|
|
3339
3345
|
var import_path15 = __toESM(require("path"), 1);
|
|
3340
3346
|
var import_dotenv = __toESM(require("dotenv"), 1);
|
|
3347
|
+
var import_os2 = __toESM(require("os"), 1);
|
|
3348
|
+
var import_child_process3 = require("child_process");
|
|
3341
3349
|
var import_http = require("http");
|
|
3342
3350
|
var import_socket = require("socket.io");
|
|
3343
3351
|
|
|
@@ -8254,7 +8262,7 @@ var HotReloadActivationError = class extends HotReloadError {
|
|
|
8254
8262
|
init_interfaces();
|
|
8255
8263
|
|
|
8256
8264
|
// packages/core/version.ts
|
|
8257
|
-
var PLATFORM_VERSION = "0.3.
|
|
8265
|
+
var PLATFORM_VERSION = "0.3.9";
|
|
8258
8266
|
var OPENLEARN_VERSION = PLATFORM_VERSION;
|
|
8259
8267
|
|
|
8260
8268
|
// packages/core/plugin-host/plugin-runtime-composition.ts
|
|
@@ -24713,6 +24721,7 @@ async function startServer() {
|
|
|
24713
24721
|
res.sendFile(import_path15.default.join(distPath, "index.html"));
|
|
24714
24722
|
});
|
|
24715
24723
|
}
|
|
24724
|
+
const HOST = process.env.HOST || "0.0.0.0";
|
|
24716
24725
|
httpServer.on("error", (err) => {
|
|
24717
24726
|
if (err.code === "EADDRINUSE") {
|
|
24718
24727
|
console.warn(`Port ${PORT} is already in use. Retrying in 1.5 seconds...`);
|
|
@@ -24721,23 +24730,68 @@ async function startServer() {
|
|
|
24721
24730
|
httpServer.close();
|
|
24722
24731
|
} catch (e) {
|
|
24723
24732
|
}
|
|
24724
|
-
httpServer.listen(PORT,
|
|
24733
|
+
httpServer.listen(PORT, HOST);
|
|
24725
24734
|
}, 1500);
|
|
24726
24735
|
} else {
|
|
24727
24736
|
console.error("HTTP Server error:", err);
|
|
24728
24737
|
}
|
|
24729
24738
|
});
|
|
24730
|
-
|
|
24731
|
-
const
|
|
24739
|
+
const getNetworkIps = () => {
|
|
24740
|
+
const ips = [];
|
|
24741
|
+
try {
|
|
24742
|
+
const interfaces = import_os2.default.networkInterfaces();
|
|
24743
|
+
for (const name of Object.keys(interfaces)) {
|
|
24744
|
+
for (const iface of interfaces[name] || []) {
|
|
24745
|
+
if (iface.family === "IPv4" && !iface.internal && !iface.address.startsWith("127.")) {
|
|
24746
|
+
ips.push(iface.address);
|
|
24747
|
+
}
|
|
24748
|
+
}
|
|
24749
|
+
}
|
|
24750
|
+
} catch {
|
|
24751
|
+
}
|
|
24752
|
+
return ips;
|
|
24753
|
+
};
|
|
24754
|
+
const openBrowser = (targetUrl) => {
|
|
24755
|
+
try {
|
|
24756
|
+
const { platform } = process;
|
|
24757
|
+
if (platform === "darwin") {
|
|
24758
|
+
(0, import_child_process3.spawn)("open", [targetUrl], { stdio: "ignore", detached: true }).unref();
|
|
24759
|
+
} else if (platform === "win32") {
|
|
24760
|
+
(0, import_child_process3.spawn)("cmd.exe", ["/c", "start", '""', targetUrl], { stdio: "ignore", detached: true }).unref();
|
|
24761
|
+
} else {
|
|
24762
|
+
(0, import_child_process3.spawn)("xdg-open", [targetUrl], { stdio: "ignore", detached: true }).unref();
|
|
24763
|
+
}
|
|
24764
|
+
} catch {
|
|
24765
|
+
}
|
|
24766
|
+
};
|
|
24767
|
+
httpServer.listen(PORT, HOST, () => {
|
|
24768
|
+
const isAnyHost = HOST === "0.0.0.0";
|
|
24769
|
+
const localUrl = `http://localhost:${PORT}`;
|
|
24770
|
+
const primaryUrl = isAnyHost ? localUrl : `http://${HOST}:${PORT}`;
|
|
24732
24771
|
const OSC = "\x1B]8;;";
|
|
24733
24772
|
const ST = "\x1B\\";
|
|
24734
24773
|
const reset = "\x1B[0m";
|
|
24735
24774
|
const bold = "\x1B[1m";
|
|
24736
24775
|
const green = "\x1B[32m";
|
|
24737
24776
|
const cyan = "\x1B[36m";
|
|
24777
|
+
const dim = "\x1B[2m";
|
|
24738
24778
|
console.log(`
|
|
24739
|
-
${bold}${green}Educational OS Kernel${reset}
|
|
24779
|
+
${bold}${green}Educational OS Kernel${reset} v${PLATFORM_VERSION} ready:
|
|
24740
24780
|
`);
|
|
24781
|
+
console.log(` ${dim}\u279C${reset} ${bold}Local:${reset} ${bold}${cyan}${OSC}${localUrl}${ST}${localUrl}${OSC}${ST}${reset}`);
|
|
24782
|
+
if (isAnyHost) {
|
|
24783
|
+
const netIps = getNetworkIps();
|
|
24784
|
+
for (const ip of netIps) {
|
|
24785
|
+
const netUrl = `http://${ip}:${PORT}`;
|
|
24786
|
+
console.log(` ${dim}\u279C${reset} ${bold}Network:${reset} ${bold}${cyan}${OSC}${netUrl}${ST}${netUrl}${OSC}${ST}${reset}`);
|
|
24787
|
+
}
|
|
24788
|
+
}
|
|
24789
|
+
console.log("");
|
|
24790
|
+
if (process.env.OPEN_BROWSER === "true") {
|
|
24791
|
+
console.log(` ${dim}\u279C Auto-opening browser: ${primaryUrl}${reset}
|
|
24792
|
+
`);
|
|
24793
|
+
openBrowser(primaryUrl);
|
|
24794
|
+
}
|
|
24741
24795
|
});
|
|
24742
24796
|
}
|
|
24743
24797
|
if (process.argv[1]?.endsWith("server.cjs") || process.argv[1]?.endsWith("server.ts")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openlearn-next",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A plugin-driven Educational OS / LMS platform with AI agent teaching assistant",
|
|
6
6
|
"keywords": [
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"dist/plugins/",
|
|
30
30
|
"cli.mjs",
|
|
31
31
|
"cli-cleaner.mjs",
|
|
32
|
+
"cli-doctor.mjs",
|
|
33
|
+
"cli-data.mjs",
|
|
32
34
|
"package.json",
|
|
33
35
|
"README.md"
|
|
34
36
|
],
|