fix(build): scaffold plugins under plugins/<vendor>/<name> (quick-261028-pq8)

- make:plugin writes plugins/<vendor>/<name> with module
  <app>/plugins/<vendor>/<name>; the package name stays <name>
- make:* and the models-leaf check look in summer.yaml, then
  plugins/<vendor>/<name>, then the older plugins/<name>
- summer new puts its starter plugin at plugins/golem15/<name>
- refuse a vendor directory that is a legacy plugin module and a second
  copy of a plugin that already sits in plugins/<name>
- help text and docs, with an upgrading note: moving is optional
This commit is contained in:
Jakub Zych
2026-10-28 18:55:46 +01:00
parent a941ab2394
commit a95a014b52
26 changed files with 247 additions and 86 deletions

View File

@@ -118,10 +118,10 @@ func TestMakeCommandsViaCLI(t *testing.T) {
}
out := runSummer("make:plugin", "golem15.demo")
if !strings.Contains(out, filepath.Join("plugins", "demo")) {
if !strings.Contains(out, filepath.Join("plugins", "golem15", "demo")) {
t.Fatalf("make:plugin output missing plugin dir:\n%s", out)
}
pluginDir := filepath.Join(dir, "plugins", "demo")
pluginDir := filepath.Join(dir, "plugins", "golem15", "demo")
if _, err := os.Stat(filepath.Join(pluginDir, "plugin.go")); err != nil {
t.Fatal(err)
}
@@ -193,7 +193,7 @@ func TestNewCommandViaCLI(t *testing.T) {
t.Fatalf("new demo --no-git: %v\n%s", err, out)
}
app := filepath.Join(parent, "sm-demo-app")
for _, rel := range []string{"summer.yaml", "main.go", "plugins/demo/routes.go"} {
for _, rel := range []string{"summer.yaml", "main.go", "plugins/golem15/demo/routes.go"} {
if _, err := os.Stat(filepath.Join(app, rel)); err != nil {
t.Fatalf("%s missing: %v", rel, err)
}