@mintlify/common 1.0.478 → 1.0.479
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.
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export type PotentialFileCategory = 'page' | 'snippet' | 'mintConfig' | 'potentialYamlOpenApiSpec' | 'potentialJsonOpenApiSpec' | 'staticFile' | 'snippet-v2' | 'css' | 'js' | 'docsConfig' | null;
|
|
1
|
+
export type PotentialFileCategory = 'page' | 'snippet' | 'mintConfig' | 'potentialYamlOpenApiSpec' | 'potentialJsonOpenApiSpec' | 'staticFile' | 'snippet-v2' | 'css' | 'js' | 'docsConfig' | 'generatedStaticFile' | null;
|
|
2
2
|
export type FileCategory = Omit<PotentialFileCategory, 'potentialYamlOpenApiSpec' | 'potentialJsonOpenApiSpec'> | 'openApi' | null;
|
|
3
|
+
export declare const generatedStaticFiles: readonly ["llms.txt", "robots.txt", "sitemap.xml", "llms-full.txt"];
|
|
4
|
+
export type GeneratedStaticFile = (typeof generatedStaticFiles)[number];
|
|
3
5
|
export declare const getFileCategory: (filePath: string) => PotentialFileCategory;
|
package/dist/getFileCategory.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { parse } from 'path';
|
|
2
2
|
import { SNIPPET_EXTENSIONS } from './mdx/snippets/constants.js';
|
|
3
3
|
const excludedMdFiles = ['readme', 'license', 'contributing', 'contribute'];
|
|
4
|
+
export const generatedStaticFiles = [
|
|
5
|
+
'llms.txt',
|
|
6
|
+
'robots.txt',
|
|
7
|
+
'sitemap.xml',
|
|
8
|
+
'llms-full.txt',
|
|
9
|
+
];
|
|
4
10
|
const supportedStaticFileExtensions = [
|
|
5
11
|
'.jpeg',
|
|
6
12
|
'.jpg',
|
|
@@ -29,6 +35,9 @@ export const getFileCategory = (filePath) => {
|
|
|
29
35
|
}
|
|
30
36
|
const fileName = parsed.name;
|
|
31
37
|
const extension = parsed.ext;
|
|
38
|
+
if (generatedStaticFiles.includes(parsed.base)) {
|
|
39
|
+
return 'generatedStaticFile';
|
|
40
|
+
}
|
|
32
41
|
if ((filePath.startsWith('_snippets/') || filePath.startsWith('snippets/')) &&
|
|
33
42
|
(SNIPPET_EXTENSIONS.some((ext) => extension === ext) || extension === '.md')) {
|
|
34
43
|
if (filePath.startsWith('_snippets/')) {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED