@mintlify/link-rot 3.0.533 → 3.0.535
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/dist/prebuild.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare const isValidPage: (filePath: ParsedPath) => boolean;
|
|
|
3
3
|
export declare const isValidMedia: (filePath: ParsedPath) => boolean;
|
|
4
4
|
export declare const isValidLink: (filePath: ParsedPath) => boolean;
|
|
5
5
|
export declare const filterNotNodeModules: (fileList: string[]) => ParsedPath[];
|
|
6
|
+
export declare const filterNotDotGithub: (fileList: string[]) => ParsedPath[];
|
|
6
7
|
export declare const filterPages: (fileList: string[]) => ParsedPath[];
|
|
7
8
|
export declare const filterMedia: (fileList: string[]) => ParsedPath[];
|
|
8
9
|
export declare const filterLinks: (fileList: string[]) => ParsedPath[];
|
package/dist/prebuild.js
CHANGED
|
@@ -21,13 +21,15 @@ const SUPPORTED_MEDIA_EXTENSIONS = [
|
|
|
21
21
|
'.css',
|
|
22
22
|
];
|
|
23
23
|
const isNotNodeModule = (filePath) => !(filePath.dir === 'node_modules' || filePath.dir.startsWith('node_modules/'));
|
|
24
|
+
const isNotDotGithub = (filePath) => !(filePath.dir === '.github' || filePath.dir.startsWith('.github/'));
|
|
24
25
|
export const isValidPage = (filePath) => SUPPORTED_PAGE_EXTENSIONS.includes(filePath.ext);
|
|
25
26
|
export const isValidMedia = (filePath) => SUPPORTED_MEDIA_EXTENSIONS.includes(filePath.ext);
|
|
26
27
|
export const isValidLink = (filePath) => isValidPage(filePath) || isValidMedia(filePath);
|
|
27
28
|
export const filterNotNodeModules = (fileList) => fileList.map(normalizePath).map(parse).filter(isNotNodeModule);
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
29
|
+
export const filterNotDotGithub = (fileList) => fileList.map(normalizePath).map(parse).filter(isNotDotGithub);
|
|
30
|
+
export const filterPages = (fileList) => filterNotNodeModules(fileList).filter(isValidPage).filter(isNotDotGithub);
|
|
31
|
+
export const filterMedia = (fileList) => filterNotNodeModules(fileList).filter(isValidMedia).filter(isNotDotGithub);
|
|
32
|
+
export const filterLinks = (fileList) => filterNotNodeModules(fileList).filter(isValidLink).filter(isNotDotGithub);
|
|
31
33
|
export const getFullPath = (filePath) => join(filePath.dir, filePath.base);
|
|
32
34
|
export const removeFileExtension = (filePath) => join(filePath.dir, filePath.name);
|
|
33
35
|
export const addLeadingSlash = (filePathString) => filePathString.startsWith('/') ? filePathString : '/' + filePathString;
|