@mintlify/link-rot 3.0.1523 → 3.0.1525

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.
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { resolveFileRefs } from '@mintlify/prebuild';
11
- import { validateDocsConfig, validateMintConfig } from '@mintlify/validation';
11
+ import { stripSourceRefs, validateDocsConfig, validateMintConfig } from '@mintlify/validation';
12
12
  import fs from 'fs-extra';
13
13
  import path from 'path';
14
14
  /**
@@ -42,13 +42,14 @@ export const readResolvedConfigJsonAndValidate = (baseDir) => __awaiter(void 0,
42
42
  const resolvedConfigJson = yield readResolvedConfigJson(baseDir);
43
43
  if (!resolvedConfigJson)
44
44
  return null;
45
- const validate = resolvedConfigJson.configFile === 'docs.json' ? validateDocsConfig : validateMintConfig;
46
- return validate(resolvedConfigJson.json);
45
+ return resolvedConfigJson.configFile === 'docs.json'
46
+ ? validateDocsConfig(stripSourceRefs(resolvedConfigJson.json))
47
+ : validateMintConfig(resolvedConfigJson.json);
47
48
  });
48
49
  export const readDocsConfig = (baseDir) => __awaiter(void 0, void 0, void 0, function* () {
49
50
  const resolved = yield readResolvedConfigJson(baseDir);
50
51
  if (!resolved || resolved.configFile !== 'docs.json')
51
52
  return null;
52
- const result = validateDocsConfig(resolved.json);
53
+ const result = validateDocsConfig(stripSourceRefs(resolved.json));
53
54
  return result.success ? result.data : null;
54
55
  });