@mintlify/cli 4.0.960 → 4.0.961
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/bin/cli.js +8 -2
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/cli.tsx +10 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.961",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@inquirer/prompts": "7.9.0",
|
|
48
48
|
"@mintlify/common": "1.0.733",
|
|
49
|
-
"@mintlify/link-rot": "3.0.
|
|
49
|
+
"@mintlify/link-rot": "3.0.896",
|
|
50
50
|
"@mintlify/models": "0.0.272",
|
|
51
51
|
"@mintlify/prebuild": "1.0.870",
|
|
52
52
|
"@mintlify/previewing": "4.0.927",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"vitest": "2.0.4",
|
|
88
88
|
"vitest-mock-process": "1.0.4"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "1e6a1e6f89205a9461fd4ee8440aca08a7073964"
|
|
91
91
|
}
|
package/src/cli.tsx
CHANGED
|
@@ -217,8 +217,13 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
|
|
|
217
217
|
.command(
|
|
218
218
|
'broken-links',
|
|
219
219
|
'check for invalid internal links',
|
|
220
|
-
() =>
|
|
221
|
-
|
|
220
|
+
(yargs) =>
|
|
221
|
+
yargs.option('check-anchors', {
|
|
222
|
+
type: 'boolean',
|
|
223
|
+
default: false,
|
|
224
|
+
description: 'also validate anchor links (e.g. #section) against heading slugs',
|
|
225
|
+
}),
|
|
226
|
+
async (argv) => {
|
|
222
227
|
const hasMintJson = await checkForMintJson();
|
|
223
228
|
if (!hasMintJson) {
|
|
224
229
|
await checkForDocsJson();
|
|
@@ -226,7 +231,9 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
|
|
|
226
231
|
|
|
227
232
|
addLog(<SpinnerLog message="checking for broken links..." />);
|
|
228
233
|
try {
|
|
229
|
-
const brokenLinks = await getBrokenInternalLinks(
|
|
234
|
+
const brokenLinks = await getBrokenInternalLinks(undefined, {
|
|
235
|
+
checkAnchors: argv['check-anchors'],
|
|
236
|
+
});
|
|
230
237
|
if (brokenLinks.length === 0) {
|
|
231
238
|
clearLogs();
|
|
232
239
|
addLog(<SuccessLog message="no broken links found" />);
|