Allow component plugins in cloud
This commit is contained in:
parent
a0f43107be
commit
9511fb72c7
|
@ -197,10 +197,12 @@ export async function storePlugin(
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function processPlugin(plugin: FileType, source?: string) {
|
export async function processPlugin(plugin: FileType, source?: string) {
|
||||||
if (!env.SELF_HOSTED) {
|
const { metadata, directory } = await fileUpload(plugin)
|
||||||
throw new Error("Plugins not supported outside of self-host.")
|
|
||||||
|
// Only allow components in cloud
|
||||||
|
if (!env.SELF_HOSTED && metadata?.schema?.type !== PluginType.COMPONENT) {
|
||||||
|
throw new Error("Only component plugins are supported outside of self-host")
|
||||||
}
|
}
|
||||||
|
|
||||||
const { metadata, directory } = await fileUpload(plugin)
|
|
||||||
return await storePlugin(metadata, directory, source)
|
return await storePlugin(metadata, directory, source)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue