dify/web/app/components/plugins/install-plugin/utils.ts

23 lines
619 B
TypeScript
Raw Normal View History

2024-10-23 11:45:36 +08:00
import type { Plugin, PluginDeclaration } from '../types'
2024-10-22 17:21:25 +08:00
export const pluginManifestToCardPluginProps = (pluginManifest: PluginDeclaration): Plugin => {
return {
type: pluginManifest.category,
category: pluginManifest.category,
name: pluginManifest.name,
version: pluginManifest.version,
latest_version: '',
org: pluginManifest.author,
label: pluginManifest.label,
brief: pluginManifest.description,
icon: pluginManifest.icon,
2024-10-23 11:45:36 +08:00
verified: pluginManifest.verified,
2024-10-22 17:21:25 +08:00
introduction: '',
repository: '',
install_count: 0,
endpoint: {
2024-10-23 11:45:36 +08:00
settings: [],
},
2024-10-22 17:21:25 +08:00
}
}