@mintlify/prebuild 1.0.1293 → 1.0.1294
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/createPage/index.d.ts +0 -0
- package/dist/createPage/index.js +0 -0
- package/dist/createPage/preparseMdx/index.d.ts +0 -0
- package/dist/createPage/preparseMdx/index.js +0 -0
- package/dist/errorMessages/formatError.d.ts +0 -0
- package/dist/errorMessages/formatError.js +0 -0
- package/dist/errorMessages/getLocationErrString.d.ts +0 -0
- package/dist/errorMessages/getLocationErrString.js +0 -0
- package/dist/fs/index.d.ts +2 -2
- package/dist/fs/index.js +30 -12
- package/dist/generate.d.ts +0 -0
- package/dist/generate.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/prebuild/__tests__/resolveRefs.test.d.ts +0 -0
- package/dist/prebuild/__tests__/resolveRefs.test.js +0 -0
- package/dist/prebuild/categorizeFilePaths.d.ts +0 -0
- package/dist/prebuild/categorizeFilePaths.js +0 -0
- package/dist/prebuild/discoverOverlayFiles.d.ts +0 -0
- package/dist/prebuild/discoverOverlayFiles.js +0 -0
- package/dist/prebuild/generateFavicons.d.ts +0 -0
- package/dist/prebuild/generateFavicons.js +0 -0
- package/dist/prebuild/getOpenApiFiles.d.ts +0 -0
- package/dist/prebuild/getOpenApiFiles.js +0 -0
- package/dist/prebuild/index.d.ts +0 -0
- package/dist/prebuild/index.js +0 -0
- package/dist/prebuild/invalidSpecFiles.d.ts +0 -0
- package/dist/prebuild/invalidSpecFiles.js +0 -0
- package/dist/prebuild/resolveRefs.d.ts +0 -0
- package/dist/prebuild/resolveRefs.js +0 -0
- package/dist/prebuild/update/ConfigUpdater.d.ts +0 -0
- package/dist/prebuild/update/ConfigUpdater.js +0 -0
- package/dist/prebuild/update/docsConfig/generateAsyncApiDivisions.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/generateAsyncApiDivisions.js +0 -0
- package/dist/prebuild/update/docsConfig/generateAsyncApiFromDocsConfig.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/generateAsyncApiFromDocsConfig.js +0 -0
- package/dist/prebuild/update/docsConfig/generateGraphqlDivisions.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/generateGraphqlDivisions.js +0 -0
- package/dist/prebuild/update/docsConfig/generateOpenApiDivisions.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/generateOpenApiDivisions.js +0 -0
- package/dist/prebuild/update/docsConfig/generateOpenApiFromDocsConfig.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/generateOpenApiFromDocsConfig.js +0 -0
- package/dist/prebuild/update/docsConfig/generateSdkDivisions.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/generateSdkDivisions.js +0 -0
- package/dist/prebuild/update/docsConfig/generatedRouteCollisions.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/generatedRouteCollisions.js +0 -0
- package/dist/prebuild/update/docsConfig/getCustomLanguages.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/getCustomLanguages.js +0 -0
- package/dist/prebuild/update/docsConfig/index.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/index.js +0 -0
- package/dist/prebuild/update/docsConfig/loadRemoteGraphqlSdl.d.ts +0 -0
- package/dist/prebuild/update/docsConfig/loadRemoteGraphqlSdl.js +0 -0
- package/dist/prebuild/update/git/getGitBlame.d.ts +0 -0
- package/dist/prebuild/update/git/getGitBlame.js +0 -0
- package/dist/prebuild/update/index.d.ts +0 -0
- package/dist/prebuild/update/index.js +0 -0
- package/dist/prebuild/update/mintConfig/generateOpenApiAnchorsOrTabs.d.ts +0 -0
- package/dist/prebuild/update/mintConfig/generateOpenApiAnchorsOrTabs.js +0 -0
- package/dist/prebuild/update/mintConfig/index.d.ts +0 -0
- package/dist/prebuild/update/mintConfig/index.js +0 -0
- package/dist/prebuild/update/preserveAutoGeneratedMetadata.d.ts +0 -0
- package/dist/prebuild/update/preserveAutoGeneratedMetadata.js +0 -0
- package/dist/prebuild/update/read/getAsyncApiFilesFromConfig.d.ts +0 -0
- package/dist/prebuild/update/read/getAsyncApiFilesFromConfig.js +0 -0
- package/dist/prebuild/update/read/getOpenApiFilesFromConfig.d.ts +0 -0
- package/dist/prebuild/update/read/getOpenApiFilesFromConfig.js +0 -0
- package/dist/prebuild/update/read/read-page-metadata.d.ts +0 -0
- package/dist/prebuild/update/read/read-page-metadata.js +0 -0
- package/dist/prebuild/update/read/readContent.d.ts +0 -0
- package/dist/prebuild/update/read/readContent.js +0 -0
- package/dist/prebuild/update/resolveImportsAndWriteFiles.d.ts +0 -0
- package/dist/prebuild/update/resolveImportsAndWriteFiles.js +0 -0
- package/dist/prebuild/update/rss/docsConfigToRss.d.ts +0 -0
- package/dist/prebuild/update/rss/docsConfigToRss.js +0 -0
- package/dist/prebuild/update/rss/index.d.ts +0 -0
- package/dist/prebuild/update/rss/index.js +0 -0
- package/dist/prebuild/update/rss/mdxToRssUpdates.d.ts +0 -0
- package/dist/prebuild/update/rss/mdxToRssUpdates.js +0 -0
- package/dist/prebuild/update/rss/pageToRss.d.ts +0 -0
- package/dist/prebuild/update/rss/pageToRss.js +0 -0
- package/dist/prebuild/update/rss/pathToRss.d.ts +0 -0
- package/dist/prebuild/update/rss/pathToRss.js +0 -0
- package/dist/prebuild/update/updateFavicons.d.ts +0 -0
- package/dist/prebuild/update/updateFavicons.js +0 -0
- package/dist/prebuild/update/updateGeneratedNav.d.ts +0 -0
- package/dist/prebuild/update/updateGeneratedNav.js +0 -0
- package/dist/prebuild/update/write/writeAsyncApiFiles.d.ts +0 -0
- package/dist/prebuild/update/write/writeAsyncApiFiles.js +0 -0
- package/dist/prebuild/update/write/writeFiles.d.ts +0 -0
- package/dist/prebuild/update/write/writeFiles.js +0 -0
- package/dist/prebuild/update/write/writeOpenApiData.d.ts +0 -0
- package/dist/prebuild/update/write/writeOpenApiData.js +0 -0
- package/dist/prebuild/update/write/writeRssFiles.d.ts +0 -0
- package/dist/prebuild/update/write/writeRssFiles.js +0 -0
- package/dist/prebuild/warnings.d.ts +0 -0
- package/dist/prebuild/warnings.js +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils.d.ts +0 -0
- package/dist/utils.js +0 -0
- package/package.json +4 -4
|
File without changes
|
package/dist/createPage/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/fs/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const getFileListSync: (dirName: string, og?: string,
|
|
2
|
-
export declare const getFileListWithDirectories: (dirName: string, og?: string) => string[];
|
|
1
|
+
export declare const getFileListSync: (dirName: string, og?: string, mintIgnore?: string[]) => string[];
|
|
2
|
+
export declare const getFileListWithDirectories: (dirName: string, og?: string, mintIgnore?: string[]) => string[];
|
|
3
3
|
export declare function getFileList(dirName: string, og?: string, mintIgnore?: string[]): AsyncIterable<string>;
|
package/dist/fs/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createMintIgnoreMatcher, isMintIgnoredBy, toPosixPath, } from '@mintlify/common';
|
|
2
2
|
import { readdirSync, realpathSync, statSync } from 'fs';
|
|
3
3
|
import { readdir } from 'fs/promises';
|
|
4
4
|
import path from 'path';
|
|
5
|
-
export const getFileListSync = (dirName, og = dirName,
|
|
5
|
+
export const getFileListSync = (dirName, og = dirName, mintIgnore = []) => {
|
|
6
|
+
return collectFileListSync(dirName, og, createMintIgnoreMatcher(mintIgnore));
|
|
7
|
+
};
|
|
8
|
+
const collectFileListSync = (dirName, og, matcher, ancestors = new Set(), root) => {
|
|
6
9
|
const files = [];
|
|
7
10
|
let realDir;
|
|
8
11
|
try {
|
|
@@ -41,47 +44,62 @@ export const getFileListSync = (dirName, og = dirName, ancestors = new Set(), ro
|
|
|
41
44
|
continue;
|
|
42
45
|
}
|
|
43
46
|
}
|
|
47
|
+
const relativePath = toPosixPath(path.relative(og, fullPath));
|
|
48
|
+
if (isMintIgnoredBy(relativePath, matcher, isDirectory)) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
44
51
|
if (isDirectory) {
|
|
45
|
-
|
|
52
|
+
const nested = collectFileListSync(fullPath, og, matcher, ancestors, realRoot);
|
|
53
|
+
for (const file of nested) {
|
|
46
54
|
files.push(file);
|
|
47
55
|
}
|
|
48
56
|
}
|
|
49
57
|
else {
|
|
50
|
-
files.push(
|
|
58
|
+
files.push(relativePath);
|
|
51
59
|
}
|
|
52
60
|
}
|
|
53
61
|
ancestors.delete(realDir);
|
|
54
62
|
return files;
|
|
55
63
|
};
|
|
56
64
|
// TODO consolidate this function
|
|
57
|
-
export const getFileListWithDirectories = (dirName, og = dirName) => {
|
|
65
|
+
export const getFileListWithDirectories = (dirName, og = dirName, mintIgnore = []) => {
|
|
66
|
+
return collectFileListWithDirectories(dirName, og, createMintIgnoreMatcher(mintIgnore));
|
|
67
|
+
};
|
|
68
|
+
const collectFileListWithDirectories = (dirName, og, matcher) => {
|
|
58
69
|
const files = [];
|
|
59
70
|
const items = readdirSync(dirName, { withFileTypes: true });
|
|
60
71
|
for (const item of items) {
|
|
61
72
|
const fullPath = path.join(dirName, item.name);
|
|
73
|
+
const relativePath = toPosixPath(path.relative(og, fullPath));
|
|
74
|
+
if (isMintIgnoredBy(relativePath, matcher, item.isDirectory())) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
62
77
|
if (item.isDirectory()) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
files.push(
|
|
78
|
+
files.push(relativePath);
|
|
79
|
+
const nested = collectFileListWithDirectories(fullPath, og, matcher);
|
|
80
|
+
for (const file of nested) {
|
|
81
|
+
files.push(file);
|
|
67
82
|
}
|
|
68
83
|
}
|
|
69
84
|
else {
|
|
70
|
-
files.push(
|
|
85
|
+
files.push(relativePath);
|
|
71
86
|
}
|
|
72
87
|
}
|
|
73
88
|
return files;
|
|
74
89
|
};
|
|
75
90
|
export async function* getFileList(dirName, og = dirName, mintIgnore = []) {
|
|
91
|
+
yield* walkFileList(dirName, og, createMintIgnoreMatcher(mintIgnore));
|
|
92
|
+
}
|
|
93
|
+
async function* walkFileList(dirName, og, matcher) {
|
|
76
94
|
const items = await readdir(dirName, { withFileTypes: true });
|
|
77
95
|
for (const item of items) {
|
|
78
96
|
const fullPath = path.join(dirName, item.name);
|
|
79
97
|
const relativePath = toPosixPath(path.relative(og, fullPath));
|
|
80
|
-
if (
|
|
98
|
+
if (isMintIgnoredBy(relativePath, matcher, item.isDirectory())) {
|
|
81
99
|
continue;
|
|
82
100
|
}
|
|
83
101
|
if (item.isDirectory()) {
|
|
84
|
-
yield*
|
|
102
|
+
yield* walkFileList(fullPath, og, matcher);
|
|
85
103
|
}
|
|
86
104
|
else {
|
|
87
105
|
yield `/${relativePath}`;
|
package/dist/generate.d.ts
CHANGED
|
File without changes
|
package/dist/generate.js
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/prebuild/index.d.ts
CHANGED
|
File without changes
|
package/dist/prebuild/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|