@mintlify/link-rot 3.0.1234 → 3.0.1235
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,4 +8,6 @@ export type ExternalLinkResult = {
|
|
|
8
8
|
originalPath: string;
|
|
9
9
|
}>;
|
|
10
10
|
};
|
|
11
|
-
export declare const getBrokenExternalLinks: (graph: Graph
|
|
11
|
+
export declare const getBrokenExternalLinks: (graph: Graph, options?: {
|
|
12
|
+
sourceFiles?: ReadonlySet<string>;
|
|
13
|
+
}) => Promise<ExternalLinkResult[]>;
|
|
@@ -57,9 +57,11 @@ const pMap = (items, fn, concurrency) => __awaiter(void 0, void 0, void 0, funct
|
|
|
57
57
|
yield Promise.all(workers);
|
|
58
58
|
return results;
|
|
59
59
|
});
|
|
60
|
-
export const getBrokenExternalLinks = (graph) => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
+
export const getBrokenExternalLinks = (graph, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
61
61
|
const urlSourceMap = new Map();
|
|
62
62
|
for (const [nodeLabel, externalPaths] of graph.getExternalPathsByNode()) {
|
|
63
|
+
if ((options === null || options === void 0 ? void 0 : options.sourceFiles) && !options.sourceFiles.has(nodeLabel))
|
|
64
|
+
continue;
|
|
63
65
|
for (const mdxPath of externalPaths) {
|
|
64
66
|
if (isHttpUrl(mdxPath.originalPath)) {
|
|
65
67
|
const url = mdxPath.originalPath;
|