fix: enhance plugin installation and update handling

This commit is contained in:
twwu
2024-11-06 09:50:05 +08:00
parent 61a70e7a71
commit 0d08b6cf51
5 changed files with 26 additions and 8 deletions

View File

@ -48,6 +48,6 @@ export const pluginManifestInMarketToPluginProps = (pluginManifest: PluginManife
}
export const parseGitHubUrl = (url: string): GitHubUrlInfo => {
const match = url.match(/^https:\/\/github\.com\/([^/]+)\/([^/]+)\/?$/)
const match = url.match(/^https:\/\/github\.com\/([^\/]+)\/([^\/]+)\/?$/)
return match ? { isValid: true, owner: match[1], repo: match[2] } : { isValid: false }
}