@mintlify/link-rot 3.0.1032 → 3.0.1034
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.
|
@@ -132,9 +132,16 @@ export const buildGraph = (repoPath, options) => __awaiter(void 0, void 0, void
|
|
|
132
132
|
}
|
|
133
133
|
const allSitePages = getPagePaths(baseDir);
|
|
134
134
|
const sitePages = allSitePages.filter((file) => !isMintIgnored(file, mintIgnoreGlobs));
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
const BUILD_GRAPH_CONCURRENCY = 8;
|
|
136
|
+
let cursor = 0;
|
|
137
|
+
const processNext = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
138
|
+
while (cursor < sitePages.length) {
|
|
139
|
+
const filePath = sitePages[cursor++];
|
|
140
|
+
if (filePath === undefined)
|
|
141
|
+
continue;
|
|
142
|
+
const fileNode = graph.getNode(filePath);
|
|
143
|
+
if (!fileNode)
|
|
144
|
+
continue;
|
|
138
145
|
const fileContent = fs.readFileSync(path.join(baseDir, filePath)).toString();
|
|
139
146
|
try {
|
|
140
147
|
yield decorateGraphNodeFromPageContent(fileNode, fileContent, {
|
|
@@ -145,7 +152,8 @@ export const buildGraph = (repoPath, options) => __awaiter(void 0, void 0, void
|
|
|
145
152
|
throw new Error(`Syntax error - Unable to parse ${filePath} - ${err}`);
|
|
146
153
|
}
|
|
147
154
|
}
|
|
148
|
-
})
|
|
155
|
+
});
|
|
156
|
+
yield Promise.all(Array.from({ length: Math.min(BUILD_GRAPH_CONCURRENCY, sitePages.length) }, processNext));
|
|
149
157
|
return graph;
|
|
150
158
|
});
|
|
151
159
|
export const getBrokenInternalLinks = (repoPath, options) => __awaiter(void 0, void 0, void 0, function* () {
|