chore: remove nextjs patch

This commit is contained in:
iCrawl
2023-11-11 19:19:14 +01:00
parent 5a4c9755c3
commit 2a25eeaf13
9 changed files with 955 additions and 822 deletions

View File

@@ -120,7 +120,7 @@ export async function generateStaticParams({ params: { package: packageName, ver
const modelJSON = await fetchModelJSON(packageName, version);
if (!modelJSON) {
return [];
return [{ package: packageName, version, item: '' }];
}
const model = addPackageToModel(new ApiModel(), modelJSON);
@@ -129,10 +129,12 @@ export async function generateStaticParams({ params: { package: packageName, ver
const entry = pkg?.entryPoints[0];
if (!entry) {
return [];
return [{ package: packageName, version, item: '' }];
}
return entry.members.map((member: ApiItem) => ({
package: packageName,
version,
item: `${member.displayName}${OVERLOAD_SEPARATOR}${member.kind}`,
}));
}

View File

@@ -5,11 +5,15 @@ import { addPackageToModel } from './addPackageToModel';
import { OVERLOAD_SEPARATOR, PACKAGES } from './constants';
import { findMember, findMemberByKey } from './model';
export const fetchMember = cache(async (packageName: string, branchName: string, item: string) => {
export const fetchMember = cache(async (packageName: string, branchName: string, item?: string) => {
if (!PACKAGES.includes(packageName)) {
return null;
}
if (!item) {
return null;
}
const model = new ApiModel();
if (branchName === 'main') {