feat(14.3-01): detect the framework checkout and guard summer new targets

- resolve the framework from --framework, then a sibling summercms or
  summercms.go checkout, then the binary's own source tree, each accepted
  only when its go.mod declares the framework module
- refuse a missing parent and a target inside the framework checkout
- remove the half-written app when any step fails
- add --no-plugin for an app with no starter plugin
This commit is contained in:
Jakub Zych
2026-10-08 11:40:20 +02:00
parent 7bc955a0c2
commit c33ebf3b95
2 changed files with 95 additions and 20 deletions

View File

@@ -309,7 +309,8 @@ func newCommand() bonfire.Command {
Required: true,
}},
Flags: []bonfire.Flag{
{Name: "framework", Description: "Path to the framework checkout"},
{Name: "framework", Description: "Path to the framework checkout (default: a sibling summercms or summercms.go checkout)"},
{Name: "no-plugin", Description: "Do not create the starter plugin", Bare: true},
},
Run: func(ctx context.Context, in bonfire.Input, out bonfire.Output) error {
name, ok := in.Argument("name")
@@ -325,6 +326,7 @@ func newCommand() bonfire.Command {
Name: name,
Parent: dir,
Framework: framework,
NoPlugin: flagTrue(in, "no-plugin"),
}, out)
return err
},