@mintlify/scraping 4.0.575 → 4.0.576
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/__test__/createOpenApiFrontmatter.test.ts +1 -1
- package/bin/apiPages/common.d.ts +2 -1
- package/bin/apiPages/common.js +4 -3
- package/bin/apiPages/common.js.map +1 -1
- package/bin/asyncapi/processAsyncApiChannel.d.ts +4 -1
- package/bin/asyncapi/processAsyncApiChannel.js.map +1 -1
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/apiPages/common.ts +8 -4
- package/src/asyncapi/processAsyncApiChannel.ts +9 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/scraping",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.576",
|
|
4
4
|
"description": "Scrape documentation frameworks to Mintlify docs",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"format:check": "prettier . --check"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@mintlify/common": "1.0.
|
|
41
|
+
"@mintlify/common": "1.0.715",
|
|
42
42
|
"@mintlify/openapi-parser": "^0.0.8",
|
|
43
43
|
"fs-extra": "11.1.1",
|
|
44
44
|
"hast-util-to-mdast": "10.1.0",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@mintlify/eslint-config-typescript": "1.0.13",
|
|
61
|
-
"@mintlify/models": "0.0.
|
|
61
|
+
"@mintlify/models": "0.0.269",
|
|
62
62
|
"@mintlify/prettier-config": "1.0.4",
|
|
63
63
|
"@mintlify/ts-config": "2.0.2",
|
|
64
|
-
"@mintlify/validation": "0.1.
|
|
64
|
+
"@mintlify/validation": "0.1.586",
|
|
65
65
|
"@trivago/prettier-plugin-sort-imports": "4.3.0",
|
|
66
66
|
"@tsconfig/recommended": "1.0.2",
|
|
67
67
|
"@types/hast": "3.0.4",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"typescript": "5.5.3",
|
|
78
78
|
"vitest": "2.0.4"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "6d9d97d9ec3ae31b959956e1d4079a2ed2079010"
|
|
81
81
|
}
|
package/src/apiPages/common.ts
CHANGED
|
@@ -10,10 +10,12 @@ import {
|
|
|
10
10
|
export const DEFAULT_API_GROUP_NAME = 'API Reference';
|
|
11
11
|
export const DEFAULT_WEBSOCKETS_GROUP_NAME = 'Websockets';
|
|
12
12
|
|
|
13
|
-
export
|
|
13
|
+
export function findNavGroup(nav: GroupsConfig, groupName?: string): PagesConfig;
|
|
14
|
+
export function findNavGroup(nav: DecoratedGroupsConfig, groupName?: string): DecoratedPagesConfig;
|
|
15
|
+
export function findNavGroup(
|
|
14
16
|
nav: GroupsConfig | DecoratedGroupsConfig,
|
|
15
17
|
groupName: string = DEFAULT_API_GROUP_NAME
|
|
16
|
-
): PagesConfig | DecoratedPagesConfig
|
|
18
|
+
): PagesConfig | DecoratedPagesConfig {
|
|
17
19
|
const group = nav.find(
|
|
18
20
|
(fileOrGroup) =>
|
|
19
21
|
typeof fileOrGroup === 'object' && 'group' in fileOrGroup && fileOrGroup.group === groupName
|
|
@@ -25,10 +27,12 @@ export const findNavGroup = (
|
|
|
25
27
|
};
|
|
26
28
|
nav.push(newGroup);
|
|
27
29
|
return newGroup.pages;
|
|
28
|
-
}
|
|
30
|
+
}
|
|
31
|
+
if (Array.isArray(group.pages)) {
|
|
29
32
|
return group.pages;
|
|
30
33
|
}
|
|
31
|
-
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
32
36
|
|
|
33
37
|
export const prepareStringToBeValidFilename = (str?: string) =>
|
|
34
38
|
str
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { optionallyAddLeadingSlash, camelToSentenceCase } from '@mintlify/common';
|
|
2
2
|
import { AsyncAPIChannel } from '@mintlify/common';
|
|
3
|
-
import { DecoratedNavigationPage } from '@mintlify/models';
|
|
3
|
+
import { DecoratedNavigationPage, NavigationEntry } from '@mintlify/models';
|
|
4
4
|
import {
|
|
5
5
|
DecoratedGroupsConfig,
|
|
6
6
|
DecoratedPagesConfig,
|
|
@@ -33,10 +33,10 @@ type ProcessAsyncApiChannelArgs = {
|
|
|
33
33
|
writePromises: Promise<void>[];
|
|
34
34
|
pagesAcc: Record<string, DecoratedNavigationPage>;
|
|
35
35
|
opts?: GenerateAsyncApiPagesOptions;
|
|
36
|
-
findNavGroup:
|
|
37
|
-
nav: GroupsConfig
|
|
38
|
-
groupName?: string
|
|
39
|
-
|
|
36
|
+
findNavGroup: {
|
|
37
|
+
(nav: GroupsConfig, groupName?: string): PagesConfig;
|
|
38
|
+
(nav: DecoratedGroupsConfig, groupName?: string): DecoratedPagesConfig;
|
|
39
|
+
};
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export const processAsyncApiChannel = ({
|
|
@@ -65,7 +65,10 @@ export const processAsyncApiChannel = ({
|
|
|
65
65
|
const navGroup = findNavGroup(nav, groupName);
|
|
66
66
|
const decoratedNavGroup = findNavGroup(decoratedNav, groupName);
|
|
67
67
|
|
|
68
|
-
const filenameWithoutExtension = generateUniqueFilenameWithoutExtension(
|
|
68
|
+
const filenameWithoutExtension = generateUniqueFilenameWithoutExtension(
|
|
69
|
+
navGroup as NavigationEntry[],
|
|
70
|
+
base
|
|
71
|
+
);
|
|
69
72
|
|
|
70
73
|
const asyncApiMetaTag = `${
|
|
71
74
|
asyncApiFilePathFromRoot ? `${asyncApiFilePathFromRoot} ` : ''
|