@mintlify/prebuild 1.0.434 → 1.0.435
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.
|
@@ -9,3 +9,5 @@ export declare function updateDocsConfigFile(contentDirectoryPath: string, openA
|
|
|
9
9
|
}>;
|
|
10
10
|
export { generateOpenApiDivisions } from './generateOpenApiDivisions.js';
|
|
11
11
|
export { generateOpenApiFromDocsConfig } from './generateOpenApiFromDocsConfig.js';
|
|
12
|
+
export { generateAsyncApiDivisions } from './generateAsyncApiDivisions.js';
|
|
13
|
+
export { generateAsyncApiFromDocsConfig } from './generateAsyncApiFromDocsConfig.js';
|
|
@@ -21,3 +21,5 @@ export async function updateDocsConfigFile(contentDirectoryPath, openApiFiles, a
|
|
|
21
21
|
}
|
|
22
22
|
export { generateOpenApiDivisions } from './generateOpenApiDivisions.js';
|
|
23
23
|
export { generateOpenApiFromDocsConfig } from './generateOpenApiFromDocsConfig.js';
|
|
24
|
+
export { generateAsyncApiDivisions } from './generateAsyncApiDivisions.js';
|
|
25
|
+
export { generateAsyncApiFromDocsConfig } from './generateAsyncApiFromDocsConfig.js';
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import fse from 'fs-extra';
|
|
2
|
+
import { load } from 'js-yaml';
|
|
2
3
|
export const writeAsyncApiFiles = async (asyncApiFiles) => {
|
|
3
4
|
const asyncApiTargetPath = 'src/_props/asyncApiFiles.json';
|
|
5
|
+
const asyncApiFilesToSave = asyncApiFiles.map(({ filename, spec, originalFileLocation }) => {
|
|
6
|
+
const originalSpec = spec['_meta']['asyncapi']['input'];
|
|
7
|
+
const asyncApiDocument = load(originalSpec);
|
|
8
|
+
return {
|
|
9
|
+
filename,
|
|
10
|
+
spec: asyncApiDocument,
|
|
11
|
+
originalFileLocation,
|
|
12
|
+
};
|
|
13
|
+
});
|
|
4
14
|
await fse.remove(asyncApiTargetPath);
|
|
5
|
-
await fse.outputFile(asyncApiTargetPath, JSON.stringify(
|
|
15
|
+
await fse.outputFile(asyncApiTargetPath, JSON.stringify(asyncApiFilesToSave), {
|
|
6
16
|
flag: 'w',
|
|
7
17
|
});
|
|
8
18
|
};
|