create-thally-docs 0.10.55 → 0.10.57
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/{chunk-D5MH737V.js → chunk-45YUNA3U.js} +1 -1
- package/dist/{chunk-WH4YY5EW.js → chunk-AQACEZTT.js} +2 -2
- package/dist/{chunk-AUF4NC7X.js → chunk-H57USRQO.js} +1 -1
- package/dist/{chunk-PJXWW3KP.js → chunk-MCC5PVLL.js} +34 -13
- package/dist/{chunk-GHEWAGPJ.js → chunk-YX3DTSOG.js} +27 -7
- package/dist/index.js +9 -5
- package/dist/migrate/index.js +5 -5
- package/dist/release.js +1 -1
- package/dist/scaffold.js +4 -4
- package/dist/starter-sync.js +2 -2
- package/dist/starter-update.js +3 -3
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readStarterReleaseManifest
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-H57USRQO.js";
|
|
5
5
|
import {
|
|
6
6
|
STABLE_SCAFFOLD_RELEASE
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YX3DTSOG.js";
|
|
8
8
|
|
|
9
9
|
// src/download.ts
|
|
10
10
|
import { Readable, Transform, pipeline } from "stream";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
readDocsJson,
|
|
6
6
|
scaffold,
|
|
7
7
|
writeDocsJson
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-45YUNA3U.js";
|
|
9
9
|
|
|
10
10
|
// src/migrate/index.ts
|
|
11
11
|
import { existsSync as existsSync3, mkdirSync, mkdtempSync, readFileSync as readFileSync3, rmSync, writeFileSync } from "fs";
|
|
@@ -144,6 +144,7 @@ function addOrphanToNav(projectDir, pageId) {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
var EXPLICIT_ID_ATTRIBUTE = /\bid=(?:"([^"]*)"|'([^']*)'|\{["']([^"'}]*)["']\})/g;
|
|
147
|
+
var NAMED_ANCHOR = /<a\b[^>]*\bname=(?:"([^"]*)"|'([^']*)')/g;
|
|
147
148
|
function forEachNonFencedLine(content, visit) {
|
|
148
149
|
let fence;
|
|
149
150
|
for (const [index, line] of content.split("\n").entries()) {
|
|
@@ -158,16 +159,33 @@ function forEachNonFencedLine(content, visit) {
|
|
|
158
159
|
}
|
|
159
160
|
function extractHeadingAnchors(content) {
|
|
160
161
|
const anchors = /* @__PURE__ */ new Set();
|
|
162
|
+
const occurrences = /* @__PURE__ */ new Map();
|
|
161
163
|
forEachNonFencedLine(content, (line) => {
|
|
162
164
|
const heading = /^ {0,3}#{1,6}\s+(.+?)\s*#*\s*$/.exec(line);
|
|
163
|
-
if (heading)
|
|
165
|
+
if (heading) {
|
|
166
|
+
const base = slugify(heading[1]);
|
|
167
|
+
const occurrence = (occurrences.get(base) ?? 0) + 1;
|
|
168
|
+
occurrences.set(base, occurrence);
|
|
169
|
+
anchors.add(occurrence === 1 ? base : `${base}-${occurrence}`);
|
|
170
|
+
}
|
|
164
171
|
for (const idMatch of line.matchAll(EXPLICIT_ID_ATTRIBUTE)) {
|
|
165
172
|
const id = idMatch[1] ?? idMatch[2] ?? idMatch[3];
|
|
166
173
|
if (id) anchors.add(id);
|
|
167
174
|
}
|
|
175
|
+
for (const nameMatch of line.matchAll(NAMED_ANCHOR)) {
|
|
176
|
+
const name = nameMatch[1] ?? nameMatch[2];
|
|
177
|
+
if (name) anchors.add(name);
|
|
178
|
+
}
|
|
168
179
|
});
|
|
169
180
|
return anchors;
|
|
170
181
|
}
|
|
182
|
+
function decodedFragment(fragment) {
|
|
183
|
+
try {
|
|
184
|
+
return decodeURIComponent(fragment);
|
|
185
|
+
} catch {
|
|
186
|
+
return fragment;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
171
189
|
function extractLinks(content) {
|
|
172
190
|
const links = [];
|
|
173
191
|
forEachNonFencedLine(content, (rawLine, lineNumber) => {
|
|
@@ -308,15 +326,6 @@ async function runCheck(projectDir, options) {
|
|
|
308
326
|
for (const filePath of allFiles) {
|
|
309
327
|
const rel = filePath.slice(contentDir.length + 1).replace(/\.mdx$/, "").replace(/\\/g, "/");
|
|
310
328
|
const pageId = rel.endsWith("/index") ? rel.slice(0, -6) : rel;
|
|
311
|
-
const { navPageId } = localizedPage(pageId, secondaryLocales);
|
|
312
|
-
if (!navPageIds.has(navPageId)) {
|
|
313
|
-
if (fix) {
|
|
314
|
-
addOrphanToNav(projectDir, pageId);
|
|
315
|
-
fixedOrphans.push(pageId);
|
|
316
|
-
} else {
|
|
317
|
-
issues.push({ severity: "warning", message: `"${pageId}" is not in docs.json nav (orphan)`, file: relative(projectDir, filePath) });
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
329
|
let data = {};
|
|
321
330
|
let content = "";
|
|
322
331
|
let lineOffset = 0;
|
|
@@ -330,6 +339,15 @@ async function runCheck(projectDir, options) {
|
|
|
330
339
|
issues.push({ severity: "error", message: `Could not parse frontmatter`, file: relative(projectDir, filePath) });
|
|
331
340
|
continue;
|
|
332
341
|
}
|
|
342
|
+
const { navPageId } = localizedPage(pageId, secondaryLocales);
|
|
343
|
+
if (!navPageIds.has(navPageId) && data.hidden !== true) {
|
|
344
|
+
if (fix) {
|
|
345
|
+
addOrphanToNav(projectDir, pageId);
|
|
346
|
+
fixedOrphans.push(pageId);
|
|
347
|
+
} else {
|
|
348
|
+
issues.push({ severity: "warning", message: `"${pageId}" is not in docs.json nav (orphan)`, file: relative(projectDir, filePath) });
|
|
349
|
+
}
|
|
350
|
+
}
|
|
333
351
|
const rel2 = relative(projectDir, filePath);
|
|
334
352
|
if (!data.title) issues.push({ severity: "warning", message: `Missing "title" in frontmatter`, file: rel2 });
|
|
335
353
|
if (!data.description) issues.push({ severity: "warning", message: `Missing "description" in frontmatter`, file: rel2 });
|
|
@@ -360,7 +378,7 @@ async function runCheck(projectDir, options) {
|
|
|
360
378
|
if (/^(https?:|mailto:|tel:)/i.test(target)) continue;
|
|
361
379
|
if (target.startsWith("#")) {
|
|
362
380
|
const anchor2 = target.slice(1);
|
|
363
|
-
if (anchor2 && !anchors.has(anchor2)) {
|
|
381
|
+
if (anchor2 && !anchors.has(decodedFragment(anchor2))) {
|
|
364
382
|
issues.push({ severity: "warning", message: `Broken anchor: "${target}" not found on this page`, file, line });
|
|
365
383
|
}
|
|
366
384
|
continue;
|
|
@@ -374,7 +392,7 @@ async function runCheck(projectDir, options) {
|
|
|
374
392
|
if (!cycle && (isGeneratedApiPath || path.startsWith("/_next") || /\.[a-z0-9]+$/i.test(path))) continue;
|
|
375
393
|
if (cycle || !validPaths.has(path)) {
|
|
376
394
|
issues.push({ severity: "error", message: `Broken link: "${target}" \u2014 no page at "${path}"`, file, line });
|
|
377
|
-
} else if (anchor && !anchorsByPath.get(path)?.has(anchor)) {
|
|
395
|
+
} else if (anchor && !anchorsByPath.get(path)?.has(decodedFragment(anchor))) {
|
|
378
396
|
issues.push({ severity: "warning", message: `Broken anchor: "${target}" \u2014 no heading "#${anchor}" on that page`, file, line });
|
|
379
397
|
}
|
|
380
398
|
}
|
|
@@ -566,6 +584,9 @@ async function migrateDocs(options) {
|
|
|
566
584
|
if (!options.into) {
|
|
567
585
|
const starterConfig = readExistingConfig(projectDir);
|
|
568
586
|
if (starterConfig?.markdown) bundle.docsConfig.markdown = starterConfig.markdown;
|
|
587
|
+
if (!bundle.docsConfig.navbar?.primary) {
|
|
588
|
+
bundle.docsConfig.navbar = { ...bundle.docsConfig.navbar, primary: null };
|
|
589
|
+
}
|
|
569
590
|
bundle.docsConfig.i18n ??= { defaultLocale: "en", locales: [{ code: "en", label: "English" }] };
|
|
570
591
|
}
|
|
571
592
|
const rendered = renderMigrationFiles(bundle, {
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
// src/stable-scaffold-release.json
|
|
4
4
|
var stable_scaffold_release_default = {
|
|
5
5
|
schemaVersion: 1,
|
|
6
|
-
id: "2026-09-28.
|
|
6
|
+
id: "2026-09-28.9729212c.c28e9504",
|
|
7
7
|
source: {
|
|
8
8
|
repository: "thallylabs/starter",
|
|
9
|
-
commitSha: "
|
|
10
|
-
treeSha: "
|
|
11
|
-
archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/
|
|
9
|
+
commitSha: "9729212cf5ab3455cfdbd2fc284da5d4126068f9",
|
|
10
|
+
treeSha: "7f28f290c40006051a02de92672ec936b898105f",
|
|
11
|
+
archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/9729212cf5ab3455cfdbd2fc284da5d4126068f9",
|
|
12
12
|
manifestPath: "starter-release.json",
|
|
13
|
-
manifestSha256: "
|
|
13
|
+
manifestSha256: "0ced61d232d02d73ec46ed9334ce660b2bfdad6cc0476ab93f6e64b90eac6214"
|
|
14
14
|
},
|
|
15
15
|
runtime: {
|
|
16
16
|
repository: "thallylabs/thally",
|
|
17
|
-
commitSha: "
|
|
18
|
-
treeSha: "
|
|
17
|
+
commitSha: "c28e9504e473e6ee3e502f35968568b821479520",
|
|
18
|
+
treeSha: "8fbb42629955add398fdfd9236999d3e3f3cd29a",
|
|
19
19
|
contentSource: "assets",
|
|
20
20
|
identityContractVersion: 1
|
|
21
21
|
},
|
|
@@ -24,6 +24,26 @@ var stable_scaffold_release_default = {
|
|
|
24
24
|
|
|
25
25
|
// src/previous-scaffold-releases.json
|
|
26
26
|
var previous_scaffold_releases_default = [
|
|
27
|
+
{
|
|
28
|
+
schemaVersion: 1,
|
|
29
|
+
id: "2026-09-28.974e64cc.4715564f",
|
|
30
|
+
source: {
|
|
31
|
+
repository: "thallylabs/starter",
|
|
32
|
+
commitSha: "974e64cc151edff5b796e5a685e2c6be3cb7004e",
|
|
33
|
+
treeSha: "02a97be2240e7edab573c824ad7e806db4e807e1",
|
|
34
|
+
archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/974e64cc151edff5b796e5a685e2c6be3cb7004e",
|
|
35
|
+
manifestPath: "starter-release.json",
|
|
36
|
+
manifestSha256: "19df9b99d40fec2b204700c2df49b6f6159c398c416b7260d36b6a9985c7a922"
|
|
37
|
+
},
|
|
38
|
+
runtime: {
|
|
39
|
+
repository: "thallylabs/thally",
|
|
40
|
+
commitSha: "4715564fff1881f2a4a3276e2808df32496b5214",
|
|
41
|
+
treeSha: "8ff6fffe59e0588f3de406fea0c941b417ab4ac7",
|
|
42
|
+
contentSource: "assets",
|
|
43
|
+
identityContractVersion: 1
|
|
44
|
+
},
|
|
45
|
+
starterVersion: 2
|
|
46
|
+
},
|
|
27
47
|
{
|
|
28
48
|
schemaVersion: 1,
|
|
29
49
|
id: "2026-09-23.03d99cfb.f870a2e2",
|
package/dist/index.js
CHANGED
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
migrateDocs,
|
|
4
4
|
parseFrontmatter,
|
|
5
5
|
runCheck
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MCC5PVLL.js";
|
|
7
7
|
import {
|
|
8
8
|
logo,
|
|
9
9
|
scaffold,
|
|
10
10
|
slugify,
|
|
11
11
|
success
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-45YUNA3U.js";
|
|
13
13
|
import "./chunk-XYRM4GAT.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-AQACEZTT.js";
|
|
15
|
+
import "./chunk-H57USRQO.js";
|
|
16
|
+
import "./chunk-YX3DTSOG.js";
|
|
17
17
|
|
|
18
18
|
// src/index.ts
|
|
19
19
|
import { existsSync as existsSync2, readdirSync } from "fs";
|
|
@@ -638,6 +638,10 @@ async function runMigrateCommand() {
|
|
|
638
638
|
yes,
|
|
639
639
|
skipValidation: flags.includes("--skip-validation")
|
|
640
640
|
});
|
|
641
|
+
console.log("");
|
|
642
|
+
console.log(` Migrated docs: ${result.projectDir}`);
|
|
643
|
+
const quotedDir = process.platform === "win32" ? `"${result.projectDir.replace(/"/g, '""')}"` : `'${result.projectDir.replace(/'/g, "'\\''")}'`;
|
|
644
|
+
console.log(` To preview: cd ${quotedDir} && npm run dev`);
|
|
641
645
|
if (result.validation.content === "failed" || result.validation.build === "failed") process.exitCode = 1;
|
|
642
646
|
}
|
|
643
647
|
async function runScaffoldCommand() {
|
package/dist/migrate/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
migrateDocs
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-MCC5PVLL.js";
|
|
5
|
+
import "../chunk-45YUNA3U.js";
|
|
6
6
|
import "../chunk-XYRM4GAT.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-AQACEZTT.js";
|
|
8
|
+
import "../chunk-H57USRQO.js";
|
|
9
|
+
import "../chunk-YX3DTSOG.js";
|
|
10
10
|
export {
|
|
11
11
|
migrateDocs
|
|
12
12
|
};
|
package/dist/release.js
CHANGED
package/dist/scaffold.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
scaffold
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-45YUNA3U.js";
|
|
5
5
|
import "./chunk-XYRM4GAT.js";
|
|
6
6
|
import {
|
|
7
7
|
STARTER_ARCHIVE_ROOT,
|
|
8
8
|
STARTER_COMMIT_SHA,
|
|
9
9
|
STARTER_REPOSITORY,
|
|
10
10
|
validateStarterArchiveEntry
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-AQACEZTT.js";
|
|
12
|
+
import "./chunk-H57USRQO.js";
|
|
13
13
|
import {
|
|
14
14
|
STABLE_SCAFFOLD_RELEASE
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YX3DTSOG.js";
|
|
16
16
|
export {
|
|
17
17
|
STABLE_SCAFFOLD_RELEASE,
|
|
18
18
|
STARTER_ARCHIVE_ROOT,
|
package/dist/starter-sync.js
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
planStarterRuntimeSync,
|
|
9
9
|
readStarterReleaseManifest,
|
|
10
10
|
starterManifestSha256
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-H57USRQO.js";
|
|
12
|
+
import "./chunk-YX3DTSOG.js";
|
|
13
13
|
export {
|
|
14
14
|
applyStarterRuntimeSyncPlan,
|
|
15
15
|
classifyStarterPath,
|
package/dist/starter-update.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
downloadStarter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AQACEZTT.js";
|
|
5
5
|
import {
|
|
6
6
|
applyStarterRuntimeSyncPlan,
|
|
7
7
|
mergeStarterOwnershipContracts,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
planStarterRuntimeSync,
|
|
10
10
|
readStarterReleaseManifest,
|
|
11
11
|
starterManifestSha256
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-H57USRQO.js";
|
|
13
13
|
import {
|
|
14
14
|
STABLE_SCAFFOLD_RELEASE,
|
|
15
15
|
SUPPORTED_SCAFFOLD_RELEASES
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YX3DTSOG.js";
|
|
17
17
|
|
|
18
18
|
// src/starter-update.ts
|
|
19
19
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-thally-docs",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.57",
|
|
4
4
|
"description": "Scaffold an open-source Thally docs site for people, search engines, and AI tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@anthropic-ai/sdk": "^0.36.0",
|
|
46
46
|
"@inquirer/prompts": "^7.0.0",
|
|
47
47
|
"@thallylabs/core": "0.2.8",
|
|
48
|
-
"@thallylabs/migrate": "0.2.
|
|
48
|
+
"@thallylabs/migrate": "0.2.9",
|
|
49
49
|
"p-limit": "^6.1.0",
|
|
50
50
|
"tar": "^7.5.22",
|
|
51
51
|
"yaml": "^2.6.0"
|