@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 +9 -7
- package/dist/render.js +3 -2
- package/package.json +1 -1
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
|
-
//
|
|
142
|
+
// description(OKF互換の1文要約)を最優先。無ければ用語集のsynonyms補足行、旧summary(移行期互換)の順
|
|
143
143
|
const synonyms = toStringArray(data.synonyms);
|
|
144
|
-
const summary =
|
|
145
|
-
?
|
|
146
|
-
:
|
|
147
|
-
?
|
|
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
|
-
//
|
|
724
|
-
if (!isT
|
|
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