@mintlify/cli 4.0.960 → 4.0.962

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 CHANGED
@@ -158,14 +158,20 @@ export const cli = ({ packageName = 'mint' }) => {
158
158
  }
159
159
  yield terminate(0);
160
160
  }))
161
- .command('broken-links', 'check for invalid internal links', () => undefined, () => __awaiter(void 0, void 0, void 0, function* () {
161
+ .command('broken-links', 'check for invalid internal links', (yargs) => yargs.option('check-anchors', {
162
+ type: 'boolean',
163
+ default: false,
164
+ description: 'also validate anchor links (e.g. #section) against heading slugs',
165
+ }), (argv) => __awaiter(void 0, void 0, void 0, function* () {
162
166
  const hasMintJson = yield checkForMintJson();
163
167
  if (!hasMintJson) {
164
168
  yield checkForDocsJson();
165
169
  }
166
170
  addLog(_jsx(SpinnerLog, { message: "checking for broken links..." }));
167
171
  try {
168
- const brokenLinks = yield getBrokenInternalLinks();
172
+ const brokenLinks = yield getBrokenInternalLinks(undefined, {
173
+ checkAnchors: argv['check-anchors'],
174
+ });
169
175
  if (brokenLinks.length === 0) {
170
176
  clearLogs();
171
177
  addLog(_jsx(SuccessLog, { message: "no broken links found" }));