openlearn-next 0.7.3 → 0.7.4
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/dist/assets/{ActivityWorkspaceWidget-5PzyxF6a.js → ActivityWorkspaceWidget-CMN8elwQ.js} +1 -1
- package/dist/assets/{AdminDirectoryView-BCtmQTEK.js → AdminDirectoryView-Dlz7q-xf.js} +1 -1
- package/dist/assets/{AssessmentCenter-B43ojHG-.js → AssessmentCenter-CaoAI9Ke.js} +1 -1
- package/dist/assets/{BatchPickerModal-CbmjInp7.js → BatchPickerModal-CzutdtIz.js} +1 -1
- package/dist/assets/{ClassesView-DEnMaDOt.js → ClassesView-RkFPpWRu.js} +1 -1
- package/dist/assets/{ClassroomCountdownWidget-CHq4983w.js → ClassroomCountdownWidget-gs42lIGW.js} +1 -1
- package/dist/assets/{CloudDriveModal-D2t3Uyzr.js → CloudDriveModal-C6JtK08M.js} +1 -1
- package/dist/assets/{ComputerLabView-YtnoT5Rb.js → ComputerLabView-Dr-g8FrU.js} +1 -1
- package/dist/assets/{CourseManagement-DOXyJ_j-.js → CourseManagement-DNeaJcT9.js} +1 -1
- package/dist/assets/{CourseWizardModal-Dbi6Caw2.js → CourseWizardModal-vw876VJr.js} +1 -1
- package/dist/assets/{Dashboard-2rLu_ZBy.js → Dashboard-C1iYnfCh.js} +1 -1
- package/dist/assets/{ExportWeightModal-BrmAh6VX.js → ExportWeightModal-CTZ-O_wi.js} +1 -1
- package/dist/assets/{HelpView-CVBrKDrd.js → HelpView-wyKldm_R.js} +1 -1
- package/dist/assets/{ImportLessonsModal-PhHtX31R.js → ImportLessonsModal-C09Z-qtx.js} +1 -1
- package/dist/assets/{InteractiveCoursewareViewer-Vi6lLz7a.js → InteractiveCoursewareViewer-V97euiJF.js} +1 -1
- package/dist/assets/{InteractiveWhiteboard-lTzeayX5.js → InteractiveWhiteboard-COLMh_-w.js} +1 -1
- package/dist/assets/{LazyCourseware-KIt0rGtW.js → LazyCourseware-0iFYlRGj.js} +2 -2
- package/dist/assets/{LazyWhiteboard-CCN3pYcW.js → LazyWhiteboard-CcoBIx6V.js} +2 -2
- package/dist/assets/{LessonEditorView-D_GVhHuM.js → LessonEditorView-BWmtKwmP.js} +1 -1
- package/dist/assets/{LiveClassroomView-BRsZ6QEq.js → LiveClassroomView-CaS1DzSS.js} +1 -1
- package/dist/assets/{NotificationDetailModal-tY5rxYCN.js → NotificationDetailModal-4MdNF4tw.js} +1 -1
- package/dist/assets/{PluginView-CedpAW6d.js → PluginView-BqTbAp30.js} +1 -1
- package/dist/assets/{QuizGeneratorModal-bUA002kP.js → QuizGeneratorModal-xTq22vDq.js} +1 -1
- package/dist/assets/{StudentAssignmentView-BhAz6Hfk.js → StudentAssignmentView-Cy_JdPYB.js} +1 -1
- package/dist/assets/{StudentLessonView-DC1yX4kG.js → StudentLessonView-B3fKejCU.js} +1 -1
- package/dist/assets/{StudentView-PHKxIV9T.js → StudentView-CpJsG7FT.js} +2 -2
- package/dist/assets/{SystemResourceLibraryModal-DgXYe6_x.js → SystemResourceLibraryModal-YZ85mv_v.js} +1 -1
- package/dist/assets/{TeacherView-DscJtOJ9.js → TeacherView-B3zhzd5g.js} +2 -2
- package/dist/assets/{TimetableView-D2ozoj_D.js → TimetableView-D_4XmrRN.js} +1 -1
- package/dist/assets/{index-2676X8YB.js → index-BzXADCXZ.js} +5 -5
- package/dist/assets/{pluginParsers-e4PSm2Iy.js → pluginParsers-PzgFzxS9.js} +1 -1
- package/dist/cli-migrator.cjs +18 -1
- package/dist/index.html +1 -1
- package/dist/server.cjs +339 -249
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as _,X as l}from"./index-
|
|
1
|
+
import{W as _,X as l}from"./index-BzXADCXZ.js";const L=s=>{const a=[];try{const i=s.match(/manifest\s*:\s*\{([\s\S]*?)\}(?:\s*,|\s*\})/),c=i?i[1]:s,m=c.match(/id\s*:\s*['"]([^'"]+)['"]/)||s.match(/id\s*:\s*['"]([^'"]+)['"]/),p=c.match(/name\s*:\s*['"]([^'"]+)['"]/)||s.match(/name\s*:\s*['"]([^'"]+)['"]/),o=c.match(/version\s*:\s*['"]([^'"]+)['"]/)||s.match(/version\s*:\s*['"]([^'"]+)['"]/),v=c.match(/description\s*:\s*['"]([^'"]+)['"]/)||s.match(/description\s*:\s*['"]([^'"]+)['"]/),h=c.match(/author\s*:\s*['"]([^'"]+)['"]/)||s.match(/author\s*:\s*['"]([^'"]+)['"]/);let r=[];const u=c.match(/capabilitiesProposed\s*:\s*\[([\s\S]*?)\]/)||s.match(/capabilitiesProposed\s*:\s*\[([\s\S]*?)\]/);u&&(r=u[1].split(",").map(t=>t.replace(/['"\s]/g,"")).filter(t=>t.length>0));const w={id:m?.[1]||void 0,name:p?.[1]||void 0,version:o?.[1]||void 0,description:v?.[1]||void 0,author:h?.[1]||void 0,capabilitiesProposed:r.length>0?r:void 0},x=/actionRegistry\.register\s*\(\s*\{([\s\S]*?)\}\s*\)/g;let f;const g=s;for(;(f=x.exec(g))!==null;){const t=f[1],n=t.match(/id\s*:\s*['"]([^'"]+)['"]/),e=t.match(/commandType\s*:\s*['"]([^'"]+)['"]/),d=t.match(/description\s*:\s*['"]([^'"]+)['"]/);(n||e)&&a.push({id:n?n[1]:"unknown",commandType:e?e[1]:"unknown",description:d?d[1]:""})}return{manifest:w,actions:a,error:null}}catch(i){return{manifest:null,actions:[],error:i.toString()}}},y=s=>{const a=s.split(/\r?\n/);if(a.length<2)return[];const i=a[0],c=[",",";"," "];let m=",",p=0;c.forEach(t=>{const n=i.split(t).length;n>p&&(p=n,m=t)});const o=_(i,m).map(t=>t.toLowerCase().replace(/["'\r]/g,"").trim()),v=l(o,["学生学号","student_number","studentnumber","student number","student_id","studentid","学号","编号"]),h=l(o,["学生姓名","student_name","studentname","student name","姓名","学生","name"]),r=l(o,["学生邮箱","student_email","studentemail","student email","邮箱","email","mail"]),u=l(o,["初始密码","initial password","password","passwd","pwd","密码"]),w=l(o,["学生备注","student notes","private_notes","备注","note","notes","remark"]),x=h>=0?h:0,f=r>=0?r:1,g=[];for(let t=1;t<a.length;t++){if(!a[t].trim())continue;const n=_(a[t],m),e=b=>b>=0&&n[b]?n[b].replace(/["'\r]/g,"").trim():"",d=e(x);if(!d)continue;const I=e(v),S=e(u),M=e(w);g.push({name:d,email:e(f),...I?{student_number:I}:{},...S?{password:S}:{},...M?{private_notes:M}:{}})}return g};export{y as a,L as p};
|
package/dist/cli-migrator.cjs
CHANGED
|
@@ -169,7 +169,7 @@ function simpleChecksum(text) {
|
|
|
169
169
|
}
|
|
170
170
|
return hash.toString(16);
|
|
171
171
|
}
|
|
172
|
-
function runMigrations(db, migrations) {
|
|
172
|
+
function runMigrations(db, migrations, options = {}) {
|
|
173
173
|
db.exec(`
|
|
174
174
|
CREATE TABLE IF NOT EXISTS _migrations (
|
|
175
175
|
name TEXT PRIMARY KEY,
|
|
@@ -180,6 +180,23 @@ function runMigrations(db, migrations) {
|
|
|
180
180
|
const appliedRows = db.prepare("SELECT name, checksum FROM _migrations").all();
|
|
181
181
|
const applied = new Map(appliedRows.map((r) => [r.name, r.checksum]));
|
|
182
182
|
const byName = new Map(migrations.map((m) => [m.name, m]));
|
|
183
|
+
const unknown = [...applied.keys()].filter((name) => !byName.has(name));
|
|
184
|
+
if (unknown.length > 0) {
|
|
185
|
+
const detail = unknown.map((n) => ` - ${n}`).join("\n");
|
|
186
|
+
const msg = `[Migration] \u53F0\u8D26\u91CC\u6709 ${unknown.length} \u4E2A\u672C\u6B21\u8FC1\u79FB\u5217\u8868\u672A\u5305\u542B\u7684\u6761\u76EE\uFF1A
|
|
187
|
+
${detail}
|
|
188
|
+
` + (options.strictLedger ? ` \u542F\u52A8\u94FE\u8DEF\u5224\u5B9A\u4E3A FATAL\uFF1A
|
|
189
|
+
\u6210\u56E0\u4E00\uFF1A\u7528\u66F4\u65B0\u7248\u672C\u7684\u5907\u4EFD\u6062\u590D\u4E86\u65E7\u4EE3\u7801\uFF08\u4EE3\u7801\u964D\u7EA7\uFF09\u2014\u2014\u8BF7\u5148\u5347\u7EA7\u4EE3\u7801\u518D\u542F\u52A8\uFF1B
|
|
190
|
+
\u6210\u56E0\u4E8C\uFF1A\u5DF2\u5E94\u7528\u7684\u8FC1\u79FB\u6587\u4EF6\u88AB\u6539\u540D\u6216\u5220\u9664\u2014\u2014\u8FC1\u79FB\u4E00\u65E6\u5E94\u7528\u4E0D\u53EF\u6539\u540D\uFF0C\u8BF7\u6062\u590D\u6587\u4EF6\u6216\u8865\u4E00\u6761\u65B0\u8FC1\u79FB\u3002
|
|
191
|
+
\u786E\u5C5E\u6709\u610F\u7684\u964D\u7EA7\u8FD0\u7EF4\uFF1A\u8BBE\u7F6E MIGRATION_ALLOW_UNKNOWN_LEDGER=true \u653E\u884C\uFF08\u4E0D\u63A8\u8350\uFF09\u3002` : ` \uFF08\u975E\u4E25\u683C\u53E3\u5F84\uFF1A\u8FC1\u79FB\u5B50\u96C6\u8C03\u7528\u5C5E\u5408\u6CD5\u7528\u6CD5\uFF0C\u4EC5\u63D0\u793A\uFF09`);
|
|
192
|
+
if (process.env.MIGRATION_ALLOW_UNKNOWN_LEDGER === "true") {
|
|
193
|
+
console.warn("[Migration] WARNING: \u672A\u77E5\u53F0\u8D26\u6761\u76EE\u5DF2\u6309 MIGRATION_ALLOW_UNKNOWN_LEDGER \u653E\u884C\uFF1A\n" + msg);
|
|
194
|
+
} else if (options.strictLedger) {
|
|
195
|
+
throw new Error(msg);
|
|
196
|
+
} else {
|
|
197
|
+
console.warn("[Migration] " + msg);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
183
200
|
const drift = [];
|
|
184
201
|
for (const [name, stored] of applied) {
|
|
185
202
|
const migration = byName.get(name);
|
package/dist/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
property="og:description"
|
|
14
14
|
content="An AI-powered Learning Management System featuring interactive classrooms, stage management, real-time student response systems, lesson editor, auto-grading, and an extensible third-party plugin ecosystem."
|
|
15
15
|
/>
|
|
16
|
-
<script type="module" crossorigin src="/assets/index-
|
|
16
|
+
<script type="module" crossorigin src="/assets/index-BzXADCXZ.js"></script>
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-utils-aM7aYvPP.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-Kv_JATwr.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/vendor-icons-CXrZ3R2V.js">
|