fix(generators): run UI tests, guard optional bus, harden e2e clones

Three generator fixes:
- templates/feature/vitest.config.ts.hbs lacked an include for
  .test.{ts,tsx}; the node base only includes .test.ts, so scaffolded
  UI component tests never executed
- gen event consume emitted an unguarded bus.subscribe although
  ctx.bus is optional in BindContext — now wrapped in if (bus) {}
- e2e repo clones now exclude /dist and /.next build outputs, and
  every dep-stripping e2e strips the scaffolded package from EVERY
  workspace package.json via globSync instead of a hardcoded dependent
  list that drifts as packages gain or drop the dependency

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 16:42:46 +02:00
parent 1e3220aef5
commit a17b984675
11 changed files with 100 additions and 41 deletions

View File

@@ -1300,7 +1300,10 @@ function handlerBindBlock(a: {
${containerVar}.unbind(${handlerSymbol});
}
${containerVar}.bind(${handlerSymbol}).toConstantValue(${wrappedVar});
bus.subscribe(${eventConst}, "${a.feature}", ${wrappedVar});`;
// ctx.bus is an OPTIONAL core (guard per CLAUDE.md binder conventions).
if (bus) {
bus.subscribe(${eventConst}, "${a.feature}", ${wrappedVar});
}`;
}
function printConsumeNextSteps(a: {