Skip to content

Commit fd9ebd7

Browse files
committed
fix: centralize search, get resources
* docs.json, adjust writing guidance placement * pf.getResources, api prep, simplify returned data * pf.helpers, remove unused filter, search response adjustment * pf.search, allow filtering standalone func and through search
1 parent 2dfe03b commit fd9ebd7

19 files changed

Lines changed: 1215 additions & 683 deletions

src/__tests__/__snapshots__/docs.embedded.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ exports[`EMBEDDED_DOCS should export the expected embedded docs structure: docs
3838
},
3939
{
4040
"category": "reference",
41-
"description": "PatternFly organization on GitHub (Core & React).",
41+
"description": "PatternFly organization on GitHub.",
4242
"displayName": "PatternFly GitHub",
4343
"path": "https://github.com/patternfly",
4444
"pathSlug": "patternfly-github",

src/__tests__/__snapshots__/patternFly.getResources.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ exports[`getPatternFlyMcpResources should return multiple organized facets: prop
1515
"resources",
1616
"docsIndex",
1717
"componentsIndex",
18-
"keywordsIndex",
1918
"isFallbackDocumentation",
19+
"keywordsIndex",
20+
"keywordsMap",
2021
"pathIndex",
2122
"byPath",
2223
"byUri",
@@ -27,10 +28,9 @@ exports[`getPatternFlyMcpResources should return multiple organized facets: prop
2728

2829
exports[`getPatternFlyReactComponentNames should return multiple organized facets: properties 1`] = `
2930
[
30-
"byVersion",
3131
"componentNamesIndex",
32-
"componentNamesWithSchemasIndex",
33-
"componentNamesWithSchemasMap",
32+
"componentNamesIndexMap",
33+
"byVersion",
3434
]
3535
`;
3636

src/__tests__/__snapshots__/patternFly.helpers.test.ts.snap

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,5 @@
11
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

3-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, current 1`] = `
4-
[
5-
"v6",
6-
]
7-
`;
8-
9-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, detected 1`] = `
10-
[
11-
"v6",
12-
]
13-
`;
14-
15-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, empty 1`] = `
16-
[
17-
"current",
18-
"latest",
19-
"v6",
20-
]
21-
`;
22-
23-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, exact semver 1`] = `
24-
[
25-
"v6",
26-
]
27-
`;
28-
29-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, latest 1`] = `
30-
[
31-
"v6",
32-
]
33-
`;
34-
35-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, null 1`] = `
36-
[
37-
"current",
38-
"latest",
39-
"v6",
40-
]
41-
`;
42-
43-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, semver 1`] = `
44-
[
45-
"v6",
46-
]
47-
`;
48-
49-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, tag 1`] = `
50-
[
51-
"v6",
52-
]
53-
`;
54-
55-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, unavailable exact semver 1`] = `
56-
[
57-
"current",
58-
"latest",
59-
"v6",
60-
]
61-
`;
62-
63-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, unavailable semver 1`] = `
64-
[
65-
"current",
66-
"latest",
67-
"v6",
68-
]
69-
`;
70-
71-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, unavailable tag 1`] = `
72-
[
73-
"current",
74-
"latest",
75-
"v6",
76-
]
77-
`;
78-
79-
exports[`filterEnumeratedPatternFlyVersions should attempt to refine a PatternFly versions based on available enumerations, undefined 1`] = `
80-
[
81-
"current",
82-
"latest",
83-
"v6",
84-
]
85-
`;
86-
873
exports[`getPatternFlyVersionContext should temporarily return option.defaults and latest versions with specific properties: keys 1`] = `
884
[
895
"availableSemVer",

src/__tests__/__snapshots__/patternFly.search.test.ts.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ exports[`searchPatternFly should attempt to return an array of all available res
55
"isSearchWildCardAll",
66
"firstExactMatch",
77
"exactMatches",
8+
"remainingMatches",
9+
"totalResults",
10+
"totalPotentialMatches",
811
]
912
`;
1013

@@ -13,6 +16,9 @@ exports[`searchPatternFly should attempt to return an array of all available res
1316
"isSearchWildCardAll",
1417
"firstExactMatch",
1518
"exactMatches",
19+
"remainingMatches",
20+
"totalResults",
21+
"totalPotentialMatches",
1622
]
1723
`;
1824

@@ -21,5 +27,8 @@ exports[`searchPatternFly should attempt to return an array of all available res
2127
"isSearchWildCardAll",
2228
"firstExactMatch",
2329
"exactMatches",
30+
"remainingMatches",
31+
"totalResults",
32+
"totalPotentialMatches",
2433
]
2534
`;

0 commit comments

Comments
 (0)