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