@contractspec/tool.docs-generator 0.0.0-canary-20260202053150 → 1.54.0

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/markdown.mjs CHANGED
@@ -7,12 +7,13 @@ function extractSummary(content) {
7
7
  const filtered = content.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && !line.startsWith("<!--"));
8
8
  if (!filtered.length) return void 0;
9
9
  const summaryLines = [];
10
+ let totalLength = 0;
10
11
  for (const line of filtered) {
11
- if (summaryLines.length && line.length === 0) break;
12
+ if (totalLength > 200) break;
12
13
  summaryLines.push(line);
13
- if (summaryLines.join(" ").length > 200) break;
14
+ totalLength += line.length;
14
15
  }
15
- const summary = summaryLines.join(" ").trim();
16
+ const summary = summaryLines.join("\n").trim();
16
17
  return summary.length ? summary : void 0;
17
18
  }
18
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.mjs","names":[],"sources":["../src/markdown.ts"],"sourcesContent":["const HEADING_MATCH = /^#\\s+(.+)$/m;\n\nexport function extractTitle(content: string, fallback: string): string {\n const match = content.match(HEADING_MATCH);\n return match?.[1]?.trim() || fallback;\n}\n\nexport function extractSummary(content: string): string | undefined {\n const lines = content.split(/\\r?\\n/).map((line) => line.trim());\n const filtered = lines.filter(\n (line) =>\n line.length > 0 && !line.startsWith('#') && !line.startsWith('<!--')\n );\n\n if (!filtered.length) return undefined;\n\n const summaryLines: string[] = [];\n for (const line of filtered) {\n if (summaryLines.length && line.length === 0) break;\n summaryLines.push(line);\n if (summaryLines.join(' ').length > 200) break;\n }\n\n const summary = summaryLines.join(' ').trim();\n return summary.length ? summary : undefined;\n}\n"],"mappings":";AAAA,MAAM,gBAAgB;AAEtB,SAAgB,aAAa,SAAiB,UAA0B;AAEtE,QADc,QAAQ,MAAM,cAAc,GAC3B,IAAI,MAAM,IAAI;;AAG/B,SAAgB,eAAe,SAAqC;CAElE,MAAM,WADQ,QAAQ,MAAM,QAAQ,CAAC,KAAK,SAAS,KAAK,MAAM,CAAC,CACxC,QACpB,SACC,KAAK,SAAS,KAAK,CAAC,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,WAAW,OAAO,CACvE;AAED,KAAI,CAAC,SAAS,OAAQ,QAAO;CAE7B,MAAM,eAAyB,EAAE;AACjC,MAAK,MAAM,QAAQ,UAAU;AAC3B,MAAI,aAAa,UAAU,KAAK,WAAW,EAAG;AAC9C,eAAa,KAAK,KAAK;AACvB,MAAI,aAAa,KAAK,IAAI,CAAC,SAAS,IAAK;;CAG3C,MAAM,UAAU,aAAa,KAAK,IAAI,CAAC,MAAM;AAC7C,QAAO,QAAQ,SAAS,UAAU"}
1
+ {"version":3,"file":"markdown.mjs","names":[],"sources":["../src/markdown.ts"],"sourcesContent":["const HEADING_MATCH = /^#\\s+(.+)$/m;\n\nexport function extractTitle(content: string, fallback: string): string {\n const match = content.match(HEADING_MATCH);\n return match?.[1]?.trim() || fallback;\n}\n\nexport function extractSummary(content: string): string | undefined {\n const lines = content.split(/\\r?\\n/).map((line) => line.trim());\n const filtered = lines.filter(\n (line) =>\n line.length > 0 && !line.startsWith('#') && !line.startsWith('<!--')\n );\n\n if (!filtered.length) return undefined;\n\n const summaryLines: string[] = [];\n let totalLength = 0;\n\n for (const line of filtered) {\n if (totalLength > 200) break;\n summaryLines.push(line);\n totalLength += line.length;\n }\n\n const summary = summaryLines.join('\\n').trim();\n return summary.length ? summary : undefined;\n}\n"],"mappings":";AAAA,MAAM,gBAAgB;AAEtB,SAAgB,aAAa,SAAiB,UAA0B;AAEtE,QADc,QAAQ,MAAM,cAAc,GAC3B,IAAI,MAAM,IAAI;;AAG/B,SAAgB,eAAe,SAAqC;CAElE,MAAM,WADQ,QAAQ,MAAM,QAAQ,CAAC,KAAK,SAAS,KAAK,MAAM,CAAC,CACxC,QACpB,SACC,KAAK,SAAS,KAAK,CAAC,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,WAAW,OAAO,CACvE;AAED,KAAI,CAAC,SAAS,OAAQ,QAAO;CAE7B,MAAM,eAAyB,EAAE;CACjC,IAAI,cAAc;AAElB,MAAK,MAAM,QAAQ,UAAU;AAC3B,MAAI,cAAc,IAAK;AACvB,eAAa,KAAK,KAAK;AACvB,iBAAe,KAAK;;CAGtB,MAAM,UAAU,aAAa,KAAK,KAAK,CAAC,MAAM;AAC9C,QAAO,QAAQ,SAAS,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/tool.docs-generator",
3
- "version": "0.0.0-canary-20260202053150",
3
+ "version": "1.54.0",
4
4
  "type": "module",
5
5
  "description": "CLI tool for generating docs artifacts from ContractSpec specs and DocBlocks",
6
6
  "keywords": [
@@ -35,12 +35,12 @@
35
35
  "README.md"
36
36
  ],
37
37
  "dependencies": {
38
- "@contractspec/lib.contracts": "0.0.0-canary-20260202053150",
38
+ "@contractspec/lib.contracts": "1.54.0",
39
39
  "commander": "^12.1.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@contractspec/tool.tsdown": "0.0.0-canary-20260202053150",
43
- "@contractspec/tool.typescript": "0.0.0-canary-20260202053150",
42
+ "@contractspec/tool.tsdown": "1.54.0",
43
+ "@contractspec/tool.typescript": "1.54.0",
44
44
  "tsdown": "^0.19.0",
45
45
  "typescript": "^5.9.3"
46
46
  },