@thanh01.pmt/curriculum-kit 1.0.21 → 1.0.22
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/index.cjs +28 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +28 -2
- package/dist/index.mjs.map +1 -1
- package/dist/storage/index.cjs +28 -2
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.mjs +28 -2
- package/dist/storage/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8637,12 +8637,15 @@ var SupabaseCurriculumAdapter = class {
|
|
|
8637
8637
|
} catch {
|
|
8638
8638
|
}
|
|
8639
8639
|
}
|
|
8640
|
+
if (relPathOrIdentifier.includes(".md") || relPathOrIdentifier.includes(".json") || relPathOrIdentifier.includes("/")) {
|
|
8641
|
+
return null;
|
|
8642
|
+
}
|
|
8640
8643
|
const lessonMatch = relPathOrIdentifier.match(/U\d+_M\d+_L\d+/i);
|
|
8641
8644
|
if (lessonMatch) {
|
|
8642
8645
|
const lessonId = lessonMatch[0].toUpperCase();
|
|
8643
8646
|
const unitCode = lessonId.split("_")[0] || "U01";
|
|
8644
8647
|
const lower = relPathOrIdentifier.toLowerCase();
|
|
8645
|
-
let artifactPrefix =
|
|
8648
|
+
let artifactPrefix = null;
|
|
8646
8649
|
if (lower.includes("act") || lower.includes("lab") || lower.includes("th\u1EF1c h\xE0nh")) {
|
|
8647
8650
|
artifactPrefix = "ACT";
|
|
8648
8651
|
} else if (lower.includes("quiz") || lower.includes("tr\u1EAFc nghi\u1EC7m") || lower.includes("\u0111\xE1nh gi\xE1")) {
|
|
@@ -8651,8 +8654,31 @@ var SupabaseCurriculumAdapter = class {
|
|
|
8651
8654
|
artifactPrefix = "SLIDE";
|
|
8652
8655
|
} else if (lower.includes("guide") || lower.includes("h\u01B0\u1EDBng d\u1EABn")) {
|
|
8653
8656
|
artifactPrefix = "GUIDE";
|
|
8657
|
+
} else if (lower.includes("wks") || lower.includes("worksheet") || lower.includes("phi\u1EBFu b\xE0i t\u1EADp")) {
|
|
8658
|
+
artifactPrefix = "WKS";
|
|
8659
|
+
} else if (lower.includes("handout") || lower.includes("t\xE0i li\u1EC7u")) {
|
|
8660
|
+
artifactPrefix = "HANDOUT";
|
|
8661
|
+
} else if (lower.includes("code")) {
|
|
8662
|
+
artifactPrefix = "CODE";
|
|
8663
|
+
} else if (lower.includes("ext") || lower.includes("extension") || lower.includes("m\u1EDF r\u1ED9ng")) {
|
|
8664
|
+
artifactPrefix = "EXT";
|
|
8665
|
+
} else if (lower.includes("exp") || lower.includes("exposition") || lower.includes("t\u1EF1 h\u1ECDc") || lower.includes("ki\u1EBFn th\u1EE9c n\u1EC1n")) {
|
|
8666
|
+
artifactPrefix = "EXPOSITION";
|
|
8667
|
+
} else if (lower.includes("rubric")) {
|
|
8668
|
+
artifactPrefix = "RUBRIC";
|
|
8669
|
+
} else if (lower.includes("bom")) {
|
|
8670
|
+
artifactPrefix = "BOM";
|
|
8671
|
+
} else if (lower.includes("lesson") || lower.includes("gi\xE1o \xE1n") || lower.includes("5e")) {
|
|
8672
|
+
artifactPrefix = "LESSON";
|
|
8673
|
+
}
|
|
8674
|
+
if (!artifactPrefix) {
|
|
8675
|
+
return null;
|
|
8654
8676
|
}
|
|
8655
|
-
const candidatePaths = [
|
|
8677
|
+
const candidatePaths = artifactPrefix === "EXPOSITION" ? [
|
|
8678
|
+
`${projectId}/_sot/expositions/${lessonId}.md`,
|
|
8679
|
+
`${projectId}/_content/${unitCode}/EXPOSITION_${lessonId}.md`,
|
|
8680
|
+
`${projectId}/lessons/${lessonId}/EXPOSITION_${lessonId}.md`
|
|
8681
|
+
] : [
|
|
8656
8682
|
`${projectId}/_content/${unitCode}/${artifactPrefix}_${lessonId}.md`,
|
|
8657
8683
|
`${projectId}/lessons/${lessonId}/${artifactPrefix}_${lessonId}.md`,
|
|
8658
8684
|
`${projectId}/${artifactPrefix}_${lessonId}.md`
|