create-thally-docs 0.10.46 → 0.10.47
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.
|
@@ -54,6 +54,7 @@ function parseFrontmatter(raw) {
|
|
|
54
54
|
|
|
55
55
|
// src/check.ts
|
|
56
56
|
import { parse as parseYaml2 } from "yaml";
|
|
57
|
+
import { projectNavigationContract } from "@thallylabs/core/navigation";
|
|
57
58
|
function gitLocal(projectDir, args) {
|
|
58
59
|
try {
|
|
59
60
|
const out = execFileSync("git", args, { cwd: projectDir, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] });
|
|
@@ -105,16 +106,6 @@ function checkDrift(projectDir, file, data, issues) {
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
function collectNavPageIds(groups, seen, duplicates) {
|
|
109
|
-
for (const page of groups) {
|
|
110
|
-
if (typeof page === "string") {
|
|
111
|
-
if (seen.has(page)) duplicates.add(page);
|
|
112
|
-
else seen.add(page);
|
|
113
|
-
} else if (page.pages) {
|
|
114
|
-
collectNavPageIds(page.pages, seen, duplicates);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
109
|
function scanMdx(dir, results) {
|
|
119
110
|
let entries;
|
|
120
111
|
try {
|
|
@@ -273,23 +264,12 @@ async function runCheck(projectDir, options) {
|
|
|
273
264
|
redirect.destination
|
|
274
265
|
])
|
|
275
266
|
);
|
|
276
|
-
const
|
|
277
|
-
const
|
|
278
|
-
for (const tab of
|
|
279
|
-
|
|
280
|
-
if (tab.href && !hasNavigationNodes) {
|
|
281
|
-
if (tab.href.startsWith("/")) navPageIds.add(tab.href.slice(1) || "introduction");
|
|
282
|
-
continue;
|
|
283
|
-
}
|
|
284
|
-
if (tab.api && tab.api.navigation !== false && !hasNavigationNodes) continue;
|
|
285
|
-
if (!hasNavigationNodes) {
|
|
286
|
-
issues.push({ severity: "error", message: `Tab "${tab.tab}" has no groups and no href \u2014 it will render empty` });
|
|
287
|
-
continue;
|
|
288
|
-
}
|
|
289
|
-
collectNavPageIds(tab.pages ?? [], navPageIds, duplicates);
|
|
290
|
-
collectNavPageIds(tab.groups ?? [], navPageIds, duplicates);
|
|
267
|
+
const navigation = projectNavigationContract(config);
|
|
268
|
+
const navPageIds = new Set(navigation.authoredPageIds);
|
|
269
|
+
for (const tab of navigation.emptyTabs) {
|
|
270
|
+
issues.push({ severity: "error", message: `Tab "${tab}" has no groups and no href \u2014 it will render empty` });
|
|
291
271
|
}
|
|
292
|
-
for (const dup of
|
|
272
|
+
for (const dup of navigation.duplicatePageIds) {
|
|
293
273
|
issues.push({ severity: "warning", message: `[duplicate] "${dup}" appears more than once in docs.json` });
|
|
294
274
|
}
|
|
295
275
|
for (const pageId of navPageIds) {
|
package/dist/index.js
CHANGED
package/dist/migrate/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-thally-docs",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.47",
|
|
4
4
|
"description": "Scaffold an open-source Thally docs site for people, search engines, and AI tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@anthropic-ai/sdk": "^0.36.0",
|
|
46
46
|
"@inquirer/prompts": "^7.0.0",
|
|
47
|
+
"@thallylabs/core": "0.2.6",
|
|
47
48
|
"@thallylabs/migrate": "0.2.6",
|
|
48
49
|
"p-limit": "^6.1.0",
|
|
49
50
|
"tar": "^7.5.22",
|