🐛 Fix(custom): fix plugin search bug

ISSUES CLOSED: #269
This commit is contained in:
Kuingsmile
2024-12-02 15:46:40 +08:00
parent 84be430b70
commit 3455c08eca
2 changed files with 4 additions and 1 deletions

View File

@@ -423,7 +423,7 @@ function handleSearchResult(item: INPMSearchResultObject) {
return {
name,
fullName: item.package.name,
author: item.package.author.name,
author: item.package.author?.name || item.package.publisher?.username,
description: item.package.description,
logo: `https://cdn.jsdelivr.net/npm/${item.package.name}/logo.png`,
config: {},

View File

@@ -227,6 +227,9 @@ interface INPMSearchResultObject {
author: {
name: string
}
publisher: {
username: string
}
links: {
npm: string
homepage: string