feat(core-shared): add analyticsEvents field to UseCaseManifest

Add optional `analyticsEvents?: readonly string[]` to `UseCaseManifest`
in `define-feature.ts` so manifests can declare which analytics events a
use case emits. Field defaults to absent (treated as []) — all existing
manifests remain valid without changes.

Update the feature generator template to emit `analyticsEvents: []` so
newly scaffolded features are analytics-declaration-ready from day one.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 11:57:49 +00:00
parent edf354318b
commit 0ee0355f5e
2 changed files with 2 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ export type UseCaseManifest = {
readonly audits: readonly string[];
readonly publishes: readonly string[];
readonly consumes: readonly string[];
readonly analyticsEvents?: readonly string[];
};
/**

View File

@@ -20,6 +20,7 @@ export const {{camelCase name}}Manifest = defineFeature({
audits: [],
publishes: [],
consumes: [],
analyticsEvents: [],
},
},
realtimeChannels: [],