openlearn-next 0.3.6 → 0.3.8
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-cleaner.mjs +131 -0
- package/cli-data.mjs +252 -0
- package/cli-doctor.mjs +189 -0
- package/cli.mjs +186 -16
- package/dist/assets/{BatchPickerModal-C98sjlMF.js → BatchPickerModal-yr3TOeuu.js} +1 -1
- package/dist/assets/{ClassesView-BPR46qdP.js → ClassesView-CJBu14nu.js} +1 -1
- package/dist/assets/{CloudDriveModal-muU449iB.js → CloudDriveModal-BYPpuwx4.js} +1 -1
- package/dist/assets/{CourseManagement-BRucWTbo.js → CourseManagement-D7HitLiU.js} +1 -1
- package/dist/assets/{CourseWizardModal-DTSK7VGp.js → CourseWizardModal-CyMoK1Os.js} +1 -1
- package/dist/assets/{Dashboard-COtcZSPW.js → Dashboard-DjCWV3Qg.js} +1 -1
- package/dist/assets/{ExportWeightModal-Dd7qjZuJ.js → ExportWeightModal-B5Cj-pLX.js} +1 -1
- package/dist/assets/{HelpView-CCmQYk87.js → HelpView-CxTV4J6V.js} +1 -1
- package/dist/assets/{ImportLessonsModal-cNlJ5wwh.js → ImportLessonsModal-CtHd6jIE.js} +1 -1
- package/dist/assets/{InteractiveCoursewareViewer-Cok6OVNk.js → InteractiveCoursewareViewer-CiOJP-Y5.js} +1 -1
- package/dist/assets/{InteractiveWhiteboard-6y5vg8O_.js → InteractiveWhiteboard-DZy7dsGY.js} +1 -1
- package/dist/assets/{LazyCourseware-wkNa0dIq.js → LazyCourseware-BpWRWiC9.js} +1 -1
- package/dist/assets/{LazyWhiteboard-Bjh_fdbw.js → LazyWhiteboard-GuLyGVWI.js} +1 -1
- package/dist/assets/{LessonEditorView-B_b0F9Cw.js → LessonEditorView-BPtkbV8_.js} +1 -1
- package/dist/assets/{LiveClassroomView-vm0rs4p7.js → LiveClassroomView-Cx5jD5H8.js} +1 -1
- package/dist/assets/{NotificationDetailModal-B3_95dku.js → NotificationDetailModal-DTwOttoS.js} +1 -1
- package/dist/assets/{PluginView-CZhQ0Ciy.js → PluginView-BB7sIiJf.js} +1 -1
- package/dist/assets/{QuizGeneratorModal-__riUCfV.js → QuizGeneratorModal-YoT3qVTl.js} +1 -1
- package/dist/assets/{StudentAssignmentView-BAL4_PJC.js → StudentAssignmentView-QIQtCByD.js} +1 -1
- package/dist/assets/{StudentLessonView-fXKI0uN9.js → StudentLessonView-ChP3ZGTo.js} +1 -1
- package/dist/assets/{StudentPreviewModal-DHgqiEHm.js → StudentPreviewModal-BIfgr0MU.js} +1 -1
- package/dist/assets/{StudentView-e7zUBtTA.js → StudentView-Clqr7kxh.js} +1 -1
- package/dist/assets/{SystemResourceLibraryModal-0MIIi5fd.js → SystemResourceLibraryModal-Cy012GB8.js} +1 -1
- package/dist/assets/{TeacherView-HxGS1psV.js → TeacherView-D-7hKKGD.js} +1 -1
- package/dist/assets/{index-CWqYoxFP.js → index-BqJrKVHF.js} +1 -1
- package/dist/assets/{index-CCKb8B5h.js → index-yp4O4BPB.js} +3 -3
- package/dist/index.html +1 -1
- package/dist/server.cjs +53 -5
- package/package.json +4 -1
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-yp4O4BPB.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
|
@@ -3338,6 +3338,8 @@ module.exports = __toCommonJS(server_exports);
|
|
|
3338
3338
|
var import_express3 = __toESM(require("express"), 1);
|
|
3339
3339
|
var import_path15 = __toESM(require("path"), 1);
|
|
3340
3340
|
var import_dotenv = __toESM(require("dotenv"), 1);
|
|
3341
|
+
var import_os2 = __toESM(require("os"), 1);
|
|
3342
|
+
var import_child_process3 = require("child_process");
|
|
3341
3343
|
var import_http = require("http");
|
|
3342
3344
|
var import_socket = require("socket.io");
|
|
3343
3345
|
|
|
@@ -8254,7 +8256,7 @@ var HotReloadActivationError = class extends HotReloadError {
|
|
|
8254
8256
|
init_interfaces();
|
|
8255
8257
|
|
|
8256
8258
|
// packages/core/version.ts
|
|
8257
|
-
var PLATFORM_VERSION = "0.3.
|
|
8259
|
+
var PLATFORM_VERSION = "0.3.8";
|
|
8258
8260
|
var OPENLEARN_VERSION = PLATFORM_VERSION;
|
|
8259
8261
|
|
|
8260
8262
|
// packages/core/plugin-host/plugin-runtime-composition.ts
|
|
@@ -24713,6 +24715,7 @@ async function startServer() {
|
|
|
24713
24715
|
res.sendFile(import_path15.default.join(distPath, "index.html"));
|
|
24714
24716
|
});
|
|
24715
24717
|
}
|
|
24718
|
+
const HOST = process.env.HOST || "0.0.0.0";
|
|
24716
24719
|
httpServer.on("error", (err) => {
|
|
24717
24720
|
if (err.code === "EADDRINUSE") {
|
|
24718
24721
|
console.warn(`Port ${PORT} is already in use. Retrying in 1.5 seconds...`);
|
|
@@ -24721,23 +24724,68 @@ async function startServer() {
|
|
|
24721
24724
|
httpServer.close();
|
|
24722
24725
|
} catch (e) {
|
|
24723
24726
|
}
|
|
24724
|
-
httpServer.listen(PORT,
|
|
24727
|
+
httpServer.listen(PORT, HOST);
|
|
24725
24728
|
}, 1500);
|
|
24726
24729
|
} else {
|
|
24727
24730
|
console.error("HTTP Server error:", err);
|
|
24728
24731
|
}
|
|
24729
24732
|
});
|
|
24730
|
-
|
|
24731
|
-
const
|
|
24733
|
+
const getNetworkIps = () => {
|
|
24734
|
+
const ips = [];
|
|
24735
|
+
try {
|
|
24736
|
+
const interfaces = import_os2.default.networkInterfaces();
|
|
24737
|
+
for (const name of Object.keys(interfaces)) {
|
|
24738
|
+
for (const iface of interfaces[name] || []) {
|
|
24739
|
+
if (iface.family === "IPv4" && !iface.internal && !iface.address.startsWith("127.")) {
|
|
24740
|
+
ips.push(iface.address);
|
|
24741
|
+
}
|
|
24742
|
+
}
|
|
24743
|
+
}
|
|
24744
|
+
} catch {
|
|
24745
|
+
}
|
|
24746
|
+
return ips;
|
|
24747
|
+
};
|
|
24748
|
+
const openBrowser = (targetUrl) => {
|
|
24749
|
+
try {
|
|
24750
|
+
const { platform } = process;
|
|
24751
|
+
if (platform === "darwin") {
|
|
24752
|
+
(0, import_child_process3.spawn)("open", [targetUrl], { stdio: "ignore", detached: true }).unref();
|
|
24753
|
+
} else if (platform === "win32") {
|
|
24754
|
+
(0, import_child_process3.spawn)("cmd.exe", ["/c", "start", '""', targetUrl], { stdio: "ignore", detached: true }).unref();
|
|
24755
|
+
} else {
|
|
24756
|
+
(0, import_child_process3.spawn)("xdg-open", [targetUrl], { stdio: "ignore", detached: true }).unref();
|
|
24757
|
+
}
|
|
24758
|
+
} catch {
|
|
24759
|
+
}
|
|
24760
|
+
};
|
|
24761
|
+
httpServer.listen(PORT, HOST, () => {
|
|
24762
|
+
const isAnyHost = HOST === "0.0.0.0";
|
|
24763
|
+
const localUrl = `http://localhost:${PORT}`;
|
|
24764
|
+
const primaryUrl = isAnyHost ? localUrl : `http://${HOST}:${PORT}`;
|
|
24732
24765
|
const OSC = "\x1B]8;;";
|
|
24733
24766
|
const ST = "\x1B\\";
|
|
24734
24767
|
const reset = "\x1B[0m";
|
|
24735
24768
|
const bold = "\x1B[1m";
|
|
24736
24769
|
const green = "\x1B[32m";
|
|
24737
24770
|
const cyan = "\x1B[36m";
|
|
24771
|
+
const dim = "\x1B[2m";
|
|
24738
24772
|
console.log(`
|
|
24739
|
-
${bold}${green}Educational OS Kernel${reset}
|
|
24773
|
+
${bold}${green}Educational OS Kernel${reset} v${PLATFORM_VERSION} ready:
|
|
24740
24774
|
`);
|
|
24775
|
+
console.log(` ${dim}\u279C${reset} ${bold}Local:${reset} ${bold}${cyan}${OSC}${localUrl}${ST}${localUrl}${OSC}${ST}${reset}`);
|
|
24776
|
+
if (isAnyHost) {
|
|
24777
|
+
const netIps = getNetworkIps();
|
|
24778
|
+
for (const ip of netIps) {
|
|
24779
|
+
const netUrl = `http://${ip}:${PORT}`;
|
|
24780
|
+
console.log(` ${dim}\u279C${reset} ${bold}Network:${reset} ${bold}${cyan}${OSC}${netUrl}${ST}${netUrl}${OSC}${ST}${reset}`);
|
|
24781
|
+
}
|
|
24782
|
+
}
|
|
24783
|
+
console.log("");
|
|
24784
|
+
if (process.env.OPEN_BROWSER === "true") {
|
|
24785
|
+
console.log(` ${dim}\u279C Auto-opening browser: ${primaryUrl}${reset}
|
|
24786
|
+
`);
|
|
24787
|
+
openBrowser(primaryUrl);
|
|
24788
|
+
}
|
|
24741
24789
|
});
|
|
24742
24790
|
}
|
|
24743
24791
|
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.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A plugin-driven Educational OS / LMS platform with AI agent teaching assistant",
|
|
6
6
|
"keywords": [
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
"dist/assets/",
|
|
29
29
|
"dist/plugins/",
|
|
30
30
|
"cli.mjs",
|
|
31
|
+
"cli-cleaner.mjs",
|
|
32
|
+
"cli-doctor.mjs",
|
|
33
|
+
"cli-data.mjs",
|
|
31
34
|
"package.json",
|
|
32
35
|
"README.md"
|
|
33
36
|
],
|