@takagaki/cortex-decisions-viewer 0.4.3 → 0.4.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.
Files changed (2) hide show
  1. package/dist/build.js +13 -1
  2. package/package.json +1 -1
package/dist/build.js CHANGED
@@ -360,7 +360,19 @@ async function scanContent(repoRoot, goldDirName, repoBaseUrl, branch) {
360
360
  }
361
361
  const rel = parts.join("/");
362
362
  const blobUrl = repoBaseUrl ? `${repoBaseUrl}/blob/${branch}/${encodePath(rel)}` : undefined;
363
- const { data, content } = (0, gray_matter_1.default)(raw);
363
+ // 生データ(Bronze/Silver)はオントロジー検証の対象外。frontmatterが壊れていても
364
+ // ビルド全体を巻き込まず、そのファイルだけ飛ばす(議事録・資料のグラフ化のために
365
+ // 全mdをパースするが、生データのYAML揺れで落ちてはならない)。
366
+ let data;
367
+ let content;
368
+ try {
369
+ ({ data, content } = (0, gray_matter_1.default)(raw));
370
+ }
371
+ catch (e) {
372
+ console.warn(` ⚠ frontmatterのパースに失敗したため、グラフ走査からスキップ: ${rel}` +
373
+ ` (${e instanceof Error ? e.message.split("\n")[0] : String(e)})`);
374
+ continue;
375
+ }
364
376
  // ノードの素性: frontmatterのID → 課題キー → リポジトリ相対パス の順で決める
365
377
  let id = rel;
366
378
  let label = path.basename(rel);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takagaki/cortex-decisions-viewer",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Cortexの意思決定記録(Decisions/*.md)を静的サイトにビルドして閲覧する。各レコードに「Edit on GitHub」リンクを付与する。",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,