@mintlify/prebuild 1.0.553 → 1.0.554

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,5 +1,6 @@
1
- export declare const prebuild: (contentDirectoryPath: string, { localSchema }?: {
1
+ export declare const prebuild: (contentDirectoryPath: string, { localSchema, groups }?: {
2
2
  localSchema?: boolean;
3
+ groups?: string[];
3
4
  }) => Promise<void>;
4
5
  export * from './categorizeFilePaths.js';
5
6
  export * from '../createPage/index.js';
@@ -1,7 +1,7 @@
1
1
  import { getConfigPath } from '../utils.js';
2
2
  import { categorizeFilePaths } from './categorizeFilePaths.js';
3
3
  import { update } from './update/index.js';
4
- export const prebuild = async (contentDirectoryPath, { localSchema } = {}) => {
4
+ export const prebuild = async (contentDirectoryPath, { localSchema, groups } = {}) => {
5
5
  if (process.env.IS_MULTI_TENANT === 'true') {
6
6
  console.log('Skipping prebuild in multi-tenant mode.');
7
7
  return;
@@ -22,6 +22,7 @@ export const prebuild = async (contentDirectoryPath, { localSchema } = {}) => {
22
22
  snippetV2Filenames: snippetsV2,
23
23
  docsConfigPath,
24
24
  localSchema,
25
+ groups,
25
26
  });
26
27
  };
27
28
  export * from './categorizeFilePaths.js';
@@ -11,8 +11,9 @@ type UpdateArgs = {
11
11
  snippetV2Filenames: string[];
12
12
  docsConfigPath?: string | null;
13
13
  localSchema?: boolean;
14
+ groups?: string[];
14
15
  };
15
- export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFiles, asyncApiFiles, contentFilenames, snippets, snippetV2Filenames, docsConfigPath, localSchema, }: UpdateArgs) => Promise<{
16
+ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFiles, asyncApiFiles, contentFilenames, snippets, snippetV2Filenames, docsConfigPath, localSchema, groups, }: UpdateArgs) => Promise<{
16
17
  name: string;
17
18
  $schema: string;
18
19
  theme: "mint";
@@ -11,7 +11,7 @@ import { writeAsyncApiFiles } from './write/writeAsyncApiFiles.js';
11
11
  import { writeFiles } from './write/writeFiles.js';
12
12
  import { writeOpenApiFiles } from './write/writeOpenApiFiles.js';
13
13
  import { writeRssFiles } from './write/writeRssFiles.js';
14
- export const update = async ({ contentDirectoryPath, staticFilenames, openApiFiles, asyncApiFiles, contentFilenames, snippets, snippetV2Filenames, docsConfigPath, localSchema, }) => {
14
+ export const update = async ({ contentDirectoryPath, staticFilenames, openApiFiles, asyncApiFiles, contentFilenames, snippets, snippetV2Filenames, docsConfigPath, localSchema, groups, }) => {
15
15
  const mintConfigResult = await updateMintConfigFile(contentDirectoryPath, openApiFiles, localSchema);
16
16
  // we used the original mint config without openapi pages injected
17
17
  // because we will do it in `updateDocsConfigFile`, this will avoid duplicated openapi pages
@@ -30,7 +30,11 @@ export const update = async ({ contentDirectoryPath, staticFilenames, openApiFil
30
30
  pagePromises,
31
31
  ]);
32
32
  const rssPages = mdxFilesWithNoImports.filter((page) => containsUpdates(page.tree));
33
+ const writeDevGroupsPromise = groups && groups.length > 0
34
+ ? outputFile('src/_props/dev-groups.json', JSON.stringify({ groups }, null, 2), { flag: 'w' })
35
+ : Promise.resolve();
33
36
  await Promise.all([
37
+ writeDevGroupsPromise,
34
38
  resolveImportsAndWriteFiles({
35
39
  openApiFiles: newOpenApiFiles,
36
40
  asyncApiFiles: newAsyncApiFiles,