feat: install by local bundle change

This commit is contained in:
Joel
2024-11-19 18:32:17 +08:00
parent e151c2ee8c
commit 5947e38ea0
7 changed files with 12 additions and 11 deletions

View File

@ -25,8 +25,8 @@ const Item: FC<Props> = ({
const info = dependency.value
const { data, error } = useUploadGitHub({
repo: info.repo!,
version: info.version!,
package: info.package!,
version: info.release!,
package: info.packages!,
})
const [payload, setPayload] = React.useState<Plugin | null>(null)
useEffect(() => {

View File

@ -23,7 +23,7 @@ const InstallByDSLList: FC<Props> = ({
onLoadedAllPlugin,
}) => {
const { isLoading: isFetchingMarketplaceData, data: marketplaceRes } = useFetchPluginsInMarketPlaceByIds(allPlugins.filter(d => d.type === 'marketplace').map(d => (d as GitHubItemAndMarketPlaceDependency).value.plugin_unique_identifier!))
console.log(allPlugins)
const [plugins, setPlugins, getPlugins] = useGetState<(Plugin | undefined)[]>((() => {
const hasLocalPackage = allPlugins.some(d => d.type === 'package')
if (!hasLocalPackage)

View File

@ -28,7 +28,7 @@ const InstallFromLocalPackage: React.FC<InstallFromLocalPackageProps> = ({
const [uniqueIdentifier, setUniqueIdentifier] = useState<string | null>(null)
const [manifest, setManifest] = useState<PluginDeclaration | null>(null)
const [errorMsg, setErrorMsg] = useState<string | null>(null)
const isBundle = file.name.endsWith('.bundle')
const isBundle = file.name.endsWith('.difybndl')
const [dependencies, setDependencies] = useState<Dependency[]>([])
const getTitle = useCallback(() => {

View File

@ -315,8 +315,8 @@ export type GitHubItemAndMarketPlaceDependency = {
type: 'github' | 'marketplace' | 'package'
value: {
repo?: string
version?: string
package?: string
release?: string
packages?: string
github_plugin_unique_identifier?: string
marketplace_plugin_unique_identifier?: string
plugin_unique_identifier?: string