@mintlify/common 1.0.807 → 1.0.809
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/mdx/index.d.ts +1 -0
- package/dist/mdx/index.js +1 -0
- package/dist/mdx/plugins/remark/remarkComponentIds.js +12 -4
- package/dist/mdx/plugins/remark/remarkExtractTableOfContents.js +56 -16
- package/dist/mdx/preprocessCustomHeadingIds.d.ts +8 -0
- package/dist/mdx/preprocessCustomHeadingIds.js +20 -0
- package/dist/mdx/remark.js +2 -1
- package/dist/mdx/server-only/getMdx.js +3 -2
- package/dist/openapi/index.d.ts +0 -1
- package/dist/openapi/index.js +0 -1
- package/dist/slug/getDecoratedNavPageAndSlug.js +0 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/openapi/prepOpenApiFrontmatter.d.ts +0 -1
- package/dist/openapi/prepOpenApiFrontmatter.js +0 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.809",
|
|
4
4
|
"description": "Commonly shared code within Mintlify",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"typescript": "5.5.3",
|
|
125
125
|
"vitest": "2.0.4"
|
|
126
126
|
},
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "719e4c7cab214535c71cfbf03e220b0667394d87"
|
|
128
128
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function prepOpenApiFrontmatter(currPath: string, openapiFrontmatter?: string): string | undefined;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { parse, isAbsolute } from 'path';
|
|
2
|
-
import { normalizeRelativePath } from '../fs/normalizeRelativePath.js';
|
|
3
|
-
import { schemaFileFrontmatterIsOriginalFileLocation, isRemoteSchemaUrl, } from '../schema/common.js';
|
|
4
|
-
import { buildOpenApiMetaTag } from './buildOpenApiMetaTag.js';
|
|
5
|
-
import { potentiallyParseOpenApiString } from './parseOpenApiString.js';
|
|
6
|
-
export function prepOpenApiFrontmatter(currPath, openapiFrontmatter) {
|
|
7
|
-
if (!openapiFrontmatter)
|
|
8
|
-
return undefined;
|
|
9
|
-
const openapiObj = potentiallyParseOpenApiString(openapiFrontmatter);
|
|
10
|
-
if ((openapiObj === null || openapiObj === void 0 ? void 0 : openapiObj.filename) && schemaFileFrontmatterIsOriginalFileLocation(openapiObj.filename)) {
|
|
11
|
-
if (isRemoteSchemaUrl(openapiObj.filename)) {
|
|
12
|
-
return buildOpenApiMetaTag({
|
|
13
|
-
filePath: openapiObj.filename,
|
|
14
|
-
method: openapiObj.method.toLowerCase(),
|
|
15
|
-
path: openapiObj.endpoint,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const filenameIsAbsolute = isAbsolute(openapiObj.filename);
|
|
19
|
-
const currDir = filenameIsAbsolute ? '/' : parse(currPath).dir;
|
|
20
|
-
const newOpenApiFilename = normalizeRelativePath(currDir, openapiObj.filename);
|
|
21
|
-
return buildOpenApiMetaTag({
|
|
22
|
-
filePath: newOpenApiFilename,
|
|
23
|
-
method: openapiObj.method.toLowerCase(),
|
|
24
|
-
path: openapiObj.endpoint,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return openapiFrontmatter;
|
|
28
|
-
}
|