Changeset 0.31.0 (#203)
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit is contained in:
@@ -270,6 +270,7 @@ func (h *PackageHandler) InstallPackage(c *gin.Context) {
|
||||
hasTools := manifest["tools"] != nil
|
||||
hasPipes := manifest["pipes"] != nil
|
||||
hasHooks := manifest["hooks"] != nil
|
||||
hasSettings := manifest["settings"] != nil
|
||||
hasExtBehavior := hasTools || hasPipes || hasHooks
|
||||
|
||||
switch pkgType {
|
||||
@@ -289,8 +290,11 @@ func (h *PackageHandler) InstallPackage(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "full packages require a route"})
|
||||
return
|
||||
}
|
||||
if !hasExtBehavior {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "full packages require at least one of: tools, pipes, hooks"})
|
||||
// v0.31.0: full packages need either server-side behavior (tools/pipes/hooks)
|
||||
// or a settings schema. A surface-with-settings is a valid "full" package
|
||||
// (e.g. editor: browser-tier surface + admin-configurable settings).
|
||||
if !hasExtBehavior && !hasSettings {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "full packages require at least one of: tools, pipes, hooks, settings"})
|
||||
return
|
||||
}
|
||||
case "workflow":
|
||||
|
||||
Reference in New Issue
Block a user