@mintlify/prebuild 1.0.1318 → 1.0.1320
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/index.d.ts
CHANGED
|
@@ -8,12 +8,13 @@ export declare const readExplicitOverlayConfig: (configPath: string | null | und
|
|
|
8
8
|
export interface PrebuildResult {
|
|
9
9
|
fileImportsMap: Map<string, Set<string>>;
|
|
10
10
|
}
|
|
11
|
-
export declare const prebuild: (contentDirectoryPath: string, { localSchema, groups, disableOpenApi, disablePrefetch, strict, allowSourceRefs, lazyPages, }?: {
|
|
11
|
+
export declare const prebuild: (contentDirectoryPath: string, { localSchema, groups, disableOpenApi, disablePrefetch, strict, skipStaticFiles, allowSourceRefs, lazyPages, }?: {
|
|
12
12
|
localSchema?: boolean;
|
|
13
13
|
groups?: string[];
|
|
14
14
|
disableOpenApi?: boolean;
|
|
15
15
|
disablePrefetch?: boolean;
|
|
16
16
|
strict?: boolean;
|
|
17
|
+
skipStaticFiles?: boolean;
|
|
17
18
|
allowSourceRefs?: boolean;
|
|
18
19
|
lazyPages?: boolean;
|
|
19
20
|
}) => Promise<PrebuildResult | undefined>;
|
package/dist/prebuild/index.js
CHANGED
|
@@ -34,7 +34,7 @@ export const readExplicitOverlayConfig = async (configPath) => {
|
|
|
34
34
|
}
|
|
35
35
|
return collectOpenApiOverlayConfig(rawConfig);
|
|
36
36
|
};
|
|
37
|
-
export const prebuild = async (contentDirectoryPath, { localSchema, groups, disableOpenApi, disablePrefetch, strict, allowSourceRefs, lazyPages, } = {}) => {
|
|
37
|
+
export const prebuild = async (contentDirectoryPath, { localSchema, groups, disableOpenApi, disablePrefetch, strict, skipStaticFiles, allowSourceRefs, lazyPages, } = {}) => {
|
|
38
38
|
if (process.env.IS_MULTI_TENANT === 'true') {
|
|
39
39
|
console.log('Skipping prebuild in multi-tenant mode.');
|
|
40
40
|
return;
|
|
@@ -67,6 +67,7 @@ export const prebuild = async (contentDirectoryPath, { localSchema, groups, disa
|
|
|
67
67
|
disableOpenApi,
|
|
68
68
|
disablePrefetch,
|
|
69
69
|
strict,
|
|
70
|
+
skipStaticFiles,
|
|
70
71
|
invalidSpecFiles,
|
|
71
72
|
allowSourceRefs,
|
|
72
73
|
lazyPages,
|
|
@@ -18,6 +18,7 @@ type UpdateArgs = {
|
|
|
18
18
|
disableOpenApi?: boolean;
|
|
19
19
|
disablePrefetch?: boolean;
|
|
20
20
|
strict?: boolean;
|
|
21
|
+
skipStaticFiles?: boolean;
|
|
21
22
|
invalidSpecFiles?: InvalidSpecFile[];
|
|
22
23
|
allowSourceRefs?: boolean;
|
|
23
24
|
lazyPages?: boolean;
|
|
@@ -25,7 +26,7 @@ type UpdateArgs = {
|
|
|
25
26
|
fileImportsMap?: Map<string, Set<string>>;
|
|
26
27
|
overlayRegistry?: OverlayRegistry;
|
|
27
28
|
};
|
|
28
|
-
export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFiles, asyncApiFiles, contentFilenames, snippets, snippetV2Filenames, docsConfigPath, localSchema, groups, mintIgnore, disableOpenApi, disablePrefetch, strict, invalidSpecFiles, allowSourceRefs, lazyPages, pageScans, fileImportsMap, overlayRegistry, }: UpdateArgs) => Promise<{
|
|
29
|
+
export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFiles, asyncApiFiles, contentFilenames, snippets, snippetV2Filenames, docsConfigPath, localSchema, groups, mintIgnore, disableOpenApi, disablePrefetch, strict, skipStaticFiles, invalidSpecFiles, allowSourceRefs, lazyPages, pageScans, fileImportsMap, overlayRegistry, }: UpdateArgs) => Promise<{
|
|
29
30
|
name: string;
|
|
30
31
|
$schema: string;
|
|
31
32
|
theme: "mint";
|
|
@@ -58,7 +58,7 @@ const filterToImportClosure = (snippetV2Filenames, rootFilenames, fileImportsMap
|
|
|
58
58
|
}
|
|
59
59
|
return snippetV2Filenames.filter((filename) => needed.has(filename.toLowerCase()));
|
|
60
60
|
};
|
|
61
|
-
export const update = async ({ contentDirectoryPath, staticFilenames, openApiFiles, asyncApiFiles, contentFilenames, snippets, snippetV2Filenames, docsConfigPath, localSchema, groups, mintIgnore, disableOpenApi, disablePrefetch, strict, invalidSpecFiles, allowSourceRefs, lazyPages, pageScans, fileImportsMap, overlayRegistry, }) => {
|
|
61
|
+
export const update = async ({ contentDirectoryPath, staticFilenames, openApiFiles, asyncApiFiles, contentFilenames, snippets, snippetV2Filenames, docsConfigPath, localSchema, groups, mintIgnore, disableOpenApi, disablePrefetch, strict, skipStaticFiles, invalidSpecFiles, allowSourceRefs, lazyPages, pageScans, fileImportsMap, overlayRegistry, }) => {
|
|
62
62
|
const mintConfigResult = await updateMintConfigFile(contentDirectoryPath, openApiFiles, localSchema, strict, invalidSpecFiles);
|
|
63
63
|
// we used the original mint config without openapi pages injected
|
|
64
64
|
// because we will do it in `updateDocsConfigFile`, this will avoid duplicated openapi pages
|
|
@@ -189,7 +189,10 @@ export const update = async ({ contentDirectoryPath, staticFilenames, openApiFil
|
|
|
189
189
|
writeRssFiles(newDocsConfig, allRssPages, contentDirectoryPath, snippetV2Contents),
|
|
190
190
|
updateFavicons(newDocsConfig, contentDirectoryPath),
|
|
191
191
|
...writeMdxFilesWithNoImports(mdxFilesWithNoImports),
|
|
192
|
-
...writeFiles(contentDirectoryPath, 'public', [
|
|
192
|
+
...writeFiles(contentDirectoryPath, 'public', [
|
|
193
|
+
...(skipStaticFiles ? [] : staticFilenames),
|
|
194
|
+
...snippets,
|
|
195
|
+
]),
|
|
193
196
|
]);
|
|
194
197
|
await writeSdkFrontmatterPages({
|
|
195
198
|
contentDirectoryPath,
|