diff --git a/web/app/(commonLayout)/plugins/test/card/page.tsx b/web/app/(commonLayout)/plugins/test/card/page.tsx index 065ff38e99..86e0da56bf 100644 --- a/web/app/(commonLayout)/plugins/test/card/page.tsx +++ b/web/app/(commonLayout)/plugins/test/card/page.tsx @@ -32,7 +32,7 @@ const PluginList = () => { type: 'github', value: { repo: 'YIXIAO0/test', - release: '1.11.5', + version: '1.11.5', package: 'test.difypkg', github_plugin_unique_identifier: 'yixiao0/test:0.0.1@3592166c87afcf944b4f13f27467a5c8f9e00bd349cb42033a072734a37431b4', }, diff --git a/web/app/components/plugins/install-plugin/install-bundle/item/github-item.tsx b/web/app/components/plugins/install-plugin/install-bundle/item/github-item.tsx index 35ec9d2369..8440b488b2 100644 --- a/web/app/components/plugins/install-plugin/install-bundle/item/github-item.tsx +++ b/web/app/components/plugins/install-plugin/install-bundle/item/github-item.tsx @@ -25,8 +25,8 @@ const Item: FC = ({ const info = dependency.value const { data, error } = useUploadGitHub({ repo: info.repo!, - version: info.release!, - package: info.packages!, + version: info.release! || info.version!, + package: info.packages! || info.package!, }) const [payload, setPayload] = React.useState(null) useEffect(() => { diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts index 0a85cbf0cb..5edd3f7cc9 100644 --- a/web/app/components/plugins/types.ts +++ b/web/app/components/plugins/types.ts @@ -315,8 +315,10 @@ export type GitHubItemAndMarketPlaceDependency = { type: 'github' | 'marketplace' | 'package' value: { repo?: string - release?: string - packages?: string + version?: string // from app DSL + package?: string // from app DSL + release?: string // from local package. same to the version + packages?: string // from local package. same to the package github_plugin_unique_identifier?: string marketplace_plugin_unique_identifier?: string plugin_unique_identifier?: string diff --git a/web/service/use-plugins.ts b/web/service/use-plugins.ts index 1007b116f4..150092239b 100644 --- a/web/service/use-plugins.ts +++ b/web/service/use-plugins.ts @@ -125,8 +125,8 @@ export const useInstallFromMarketplaceAndGitHub = ({ await post('/workspaces/current/plugin/install/github', { body: { repo: data.value.repo!, - version: data.value.release!, - package: data.value.packages!, + version: data.value.release! || data.value.version!, + package: data.value.packages! || data.value.package!, plugin_unique_identifier: data.value.github_plugin_unique_identifier!, }, })