@kzmshx/chiken 0.1.1 → 0.1.2

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/cli.mjs CHANGED
@@ -809,7 +809,7 @@ async function buildExports(root, only) {
809
809
  vetMap(v.map);
810
810
  const photoOf = await preparePhotos(v);
811
811
  const targets = v.config.exports.filter((x) => !only || x.name === only);
812
- if (only && !targets.length) throw new Error(`\u66F8\u304D\u51FA\u3057\u304C\u306A\u3044: ${only}\uFF08chiken.yaml \u306E exports: ${v.config.exports.map((x) => x.name).join(", ")}\uFF09`);
812
+ if (only && !targets.length) throw new Error(`\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u304C\u306A\u3044: ${only}\uFF08chiken.yaml \u306E exports: ${v.config.exports.map((x) => x.name).join(", ")}\uFF09`);
813
813
  for (const e of targets) {
814
814
  const forbid = e.rules && v.config.rules?.[e.rules]?.forbid || [];
815
815
  const out2 = path7.resolve(root, e.out);
@@ -855,11 +855,11 @@ import path8 from "node:path";
855
855
  function releaseZip(root, only, dir) {
856
856
  const v = readRoot(root);
857
857
  const e = v.config.exports.find((x) => only ? x.name === only : !!x.release);
858
- if (!e?.release) throw new Error("release \u3092\u6301\u3064\u66F8\u304D\u51FA\u3057\u304C\u306A\u3044\uFF08chiken.yaml \u306E exports\uFF09");
858
+ if (!e?.release) throw new Error("release \u3092\u6301\u3064\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u304C\u306A\u3044\uFF08chiken.yaml \u306E exports\uFF09");
859
859
  const outDir = dir ?? path8.dirname(path8.resolve(root, e.out));
860
860
  const name = e.release.name;
861
861
  const report = path8.join(CACHE, `report-${e.name}`);
862
- if (!fs8.existsSync(path8.join(report, "index.html"))) throw new Error(`\u66F8\u304D\u51FA\u3057\u304C\u306A\u3044\u3002\u5148\u306B\u66F8\u304D\u51FA\u3057\u3092\u6D41\u3059: ${report}`);
862
+ if (!fs8.existsSync(path8.join(report, "index.html"))) throw new Error(`\u66F8\u304D\u51FA\u3057\u305F\u3082\u306E\u304C\u306A\u3044\u3002\u5148\u306B chiken build \u3092\u6D41\u3059: ${report}`);
863
863
  fs8.mkdirSync(outDir, { recursive: true });
864
864
  const siteDir = path8.join(outDir, `${name}-site`);
865
865
  const zip = path8.join(outDir, `${name}-site.zip`);
@@ -1182,14 +1182,14 @@ function check(v) {
1182
1182
  const G = /^[a-z0-9][a-z0-9-]*$/;
1183
1183
  const groupsOf = [...m.problems.map((p) => [p.id, p.groups]), ...m.actions.map((a) => [a.id, a.groups]), ...m.insightSources.map((x) => [x.id, x.groups]), ...m.insights.map((i) => [i.id, i.groups])];
1184
1184
  for (const [id, gs] of groupsOf) for (const g of gs ?? []) if (!G.test(g)) err(`${id} \u306E\u30B0\u30EB\u30FC\u30D7\u306E\u540D\u524D: ${g}\uFF08\u82F1\u5C0F\u6587\u5B57\u30FB\u6570\u5B57\u30FB\u30CF\u30A4\u30D5\u30F3\uFF09`);
1185
- for (const id of v.legacyShare) err(`${id} \u306B share \u304C\u3042\u308B\u3002\u4ECA\u306F groups \u3067\u66F8\u304F\uFF08share: self \u306F groups: [private] \u306B\u3057\u3001\u66F8\u304D\u51FA\u3057\u3067 exclude: [private]\uFF09`);
1185
+ for (const id of v.legacyShare) err(`${id} \u306B share \u304C\u3042\u308B\u3002\u4ECA\u306F groups \u3067\u66F8\u304F\uFF08share: self \u306F groups: [private] \u306B\u3057\u3001\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067 exclude: [private]\uFF09`);
1186
1186
  const used = new Set(groupsOf.flatMap(([, gs]) => gs ?? []));
1187
1187
  for (const e of v.config.exports ?? []) {
1188
- if (e.rules && !v.config.rules?.[e.rules]) err(`\u66F8\u304D\u51FA\u3057 ${e.name} \u306E rules \u304C\u306A\u3044: ${e.rules}\uFF08chiken.yaml \u306E rules\uFF09`);
1189
- for (const g of [...e.include ?? [], ...e.exclude ?? []]) if (!used.has(g)) warn(`\u66F8\u304D\u51FA\u3057 ${e.name} \u306E\u30B0\u30EB\u30FC\u30D7 ${g} \u3092\u6301\u3064\u3082\u306E\u304C\u306A\u3044\uFF08\u7DB4\u308A\u3092\u78BA\u304B\u3081\u308B\uFF09`);
1190
- if (e.audience !== void 0) err(`\u66F8\u304D\u51FA\u3057 ${e.name} \u306B audience \u304C\u3042\u308B\u3002\u4ECA\u306F exclude \u3068 rules \u3067\u66F8\u304F\uFF08ADR-0011\uFF09`);
1188
+ if (e.rules && !v.config.rules?.[e.rules]) err(`\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8 ${e.name} \u306E rules \u304C\u306A\u3044: ${e.rules}\uFF08chiken.yaml \u306E rules\uFF09`);
1189
+ for (const g of [...e.include ?? [], ...e.exclude ?? []]) if (!used.has(g)) warn(`\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8 ${e.name} \u306E\u30B0\u30EB\u30FC\u30D7 ${g} \u3092\u6301\u3064\u3082\u306E\u304C\u306A\u3044\uFF08\u7DB4\u308A\u3092\u78BA\u304B\u3081\u308B\uFF09`);
1190
+ if (e.audience !== void 0) err(`\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8 ${e.name} \u306B audience \u304C\u3042\u308B\u3002\u4ECA\u306F exclude \u3068 rules \u3067\u66F8\u304F\uFF08ADR-0011\uFF09`);
1191
1191
  }
1192
- if (v.config.org !== void 0) err("chiken.yaml \u306B org \u304C\u3042\u308B\u3002\u4ECA\u306F rules \u306B\u540D\u524D\u3092\u4ED8\u3051\u3066\u66F8\u304D\u3001\u66F8\u304D\u51FA\u3057\u306E rules \u3067\u6307\u3059\uFF08ADR-0011\uFF09");
1192
+ if (v.config.org !== void 0) err("chiken.yaml \u306B org \u304C\u3042\u308B\u3002\u4ECA\u306F rules \u306B\u540D\u524D\u3092\u4ED8\u3051\u3066\u66F8\u304D\u3001\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u306E rules \u3067\u6307\u3059\uFF08ADR-0011\uFF09");
1193
1193
  const cyc = (edges, what) => {
1194
1194
  const g = /* @__PURE__ */ new Map();
1195
1195
  for (const [a, b] of edges) g.set(a, [...g.get(a) ?? [], b]);
@@ -1523,9 +1523,9 @@ var HELP = `chiken [--root <\u30C7\u30FC\u30BF\u30D5\u30A9\u30EB\u30C0>] [--json
1523
1523
  rm <ID> \u8AB2\u984C\u30FB\u30A2\u30AF\u30B7\u30E7\u30F3\u30FB\u77E5\u898B\u3092\u6D88\u3057\u3001\u6307\u3057\u3066\u3044\u308B\u3068\u3053\u308D\u3082\u5916\u3059
1524
1524
 
1525
1525
  \u66F8\u304D\u51FA\u3059
1526
- build [<\u66F8\u304D\u51FA\u3057\u306E\u540D\u524D>] chiken.yaml \u306E exports \u306E HTML
1527
- release [<\u66F8\u304D\u51FA\u3057\u306E\u540D\u524D>] release \u3092\u6301\u3064\u66F8\u304D\u51FA\u3057\u306E zip
1528
- serve [--edit] [--port 5178] [--export <\u66F8\u304D\u51FA\u3057\u306E\u540D\u524D>]
1526
+ build [<\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u306E\u540D\u524D>] chiken.yaml \u306E exports \u306E HTML
1527
+ release [<\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u306E\u540D\u524D>] release \u3092\u6301\u3064\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u306E zip
1528
+ serve [--edit] [--port 5178] [--export <\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u306E\u540D\u524D>]
1529
1529
  \u753B\u9762\u3092\u624B\u5143\u3067\u958B\u304F\uFF08--edit \u3067\u7DE8\u96C6\u30E2\u30FC\u30C9\uFF09
1530
1530
 
1531
1531
  --json \u306F\u3001\u4E00\u89A7\u30FB\u4E2D\u8EAB\u30FB\u70B9\u691C\u30FB\u66F8\u304D\u63DB\u3048\u306E\u7D50\u679C\u3092 JSON \u3067\u51FA\u3059\u3002\u8A73\u3057\u304F\u306F docs/data-layout.md \u306E\u300CCLI\u300D\u3002`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kzmshx/chiken",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "license": "MIT",
5
5
  "description": "知見・課題・アクションを Markdown で書き、つながりをたどれる地図を 1 枚の HTML に書き出す CLI",
6
6
  "keywords": [
package/schema/model.cue CHANGED
@@ -15,7 +15,7 @@ package chiken
15
15
  #InsightId: string
16
16
  #ActionId: =~"^A[0-9]{3,}$"
17
17
 
18
- // グループ: 課題・アクション・インプット・知見に付ける自由な名前。書き出しで、含めるグループと外すグループを指定して絞る(ADR-0011)
18
+ // グループ: 課題・アクション・インプット・知見に付ける自由な名前。エクスポートで、含めるグループと外すグループを指定して絞る(ADR-0011)
19
19
  #Group: =~"^[a-z0-9][a-z0-9-]*$"
20
20
 
21
21
  // コンテキスト: 課題が属する組織・プロジェクト(会社、個人の開発など)。1 つのデータフォルダに複数置け、領域はどれかのコンテキストに属する。知見はコンテキストをまたいで使える