@takagaki/cortex-decisions-viewer 0.4.17 → 0.4.19

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/build.js CHANGED
@@ -139,13 +139,15 @@ async function parseGeneric(raw, fileName, repoRelDir, repoBaseUrl, branch) {
139
139
  const id = String(data.id ?? fileName.replace(/\.md$/i, ""));
140
140
  const title = String(data.title ?? (h1 ? h1[1].trim() : fileName.replace(/\.md$/i, "")));
141
141
  const date = normalizeDate(data.date);
142
- // 用語集: synonyms を補足行に。それ以外は frontmatter summary があれば使う
142
+ // description(OKF互換の1文要約)を最優先。無ければ用語集のsynonyms補足行、旧summary(移行期互換)の順
143
143
  const synonyms = toStringArray(data.synonyms);
144
- const summary = synonyms.length
145
- ? "同義語: " + synonyms.join(" / ")
146
- : data.summary != null
147
- ? String(data.summary)
148
- : "";
144
+ const summary = data.description != null
145
+ ? String(data.description)
146
+ : synonyms.length
147
+ ? "同義語: " + synonyms.join(" / ")
148
+ : data.summary != null
149
+ ? String(data.summary)
150
+ : "";
149
151
  const bodyHtml = externalLinksToNewTab((await marked_1.marked.parse(content, { async: true })).replace(/^\s*<h1[^>]*>[\s\S]*?<\/h1>\s*/, ""));
150
152
  const filePath = repoRelDir ? `${repoRelDir}/${fileName}` : fileName;
151
153
  const editUrl = repoBaseUrl
@@ -918,7 +920,7 @@ async function parseDecision(raw, fileName, repoRelDir, repoBaseUrl, branch) {
918
920
  const date = normalizeDate(data.date);
919
921
  const sprint = data.sprint != null ? String(data.sprint) : "";
920
922
  const category = data.category != null ? String(data.category) : "";
921
- const summary = data.summary != null ? String(data.summary) : "";
923
+ const summary = data.description != null ? String(data.description) : data.summary != null ? String(data.summary) : ""; // description優先(旧summaryは移行期互換)
922
924
  const deciders = toStringArray(data.deciders);
923
925
  const referencesRaw = toStringArray(data.references);
924
926
  const references = referencesRaw.map((r) => resolveReference(r, repoBaseUrl, branch));
package/dist/render.js CHANGED
@@ -720,8 +720,9 @@ const CLIENT_JS = `
720
720
  });
721
721
  }
722
722
  function isAllowed(f) {
723
- // 資料は画像をMIMEで全面許可(拡張子が取れない/変則的でも通す)。文字起こしは拡張子判定のみ。
724
- if (!isT && f.type && f.type.indexOf("image/") === 0) return true;
723
+ // 資料はフロントで弾かない(どんなファイルも受け付ける)。対応可否の最終判断はバックエンドに任せる。
724
+ if (!isT) return true;
725
+ // 文字起こしは議事録化に不適なファイルを避けるため拡張子で判定する。
725
726
  var ext = extOf(f.name);
726
727
  return !!(ext && allowedExt[ext]);
727
728
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takagaki/cortex-decisions-viewer",
3
- "version": "0.4.17",
3
+ "version": "0.4.19",
4
4
  "description": "Cortexの意思決定記録(Decisions/*.md)を静的サイトにビルドして閲覧する。各レコードに「Edit on GitHub」リンクを付与する。",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,