From 0ee0355f5e226b7d86f8fc4a565af7c1f06d57e5 Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Mon, 18 May 2026 11:57:49 +0000 Subject: [PATCH] feat(core-shared): add analyticsEvents field to UseCaseManifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- packages/core-shared/src/conformance/define-feature.ts | 1 + turbo/generators/templates/feature/src/feature.manifest.ts.hbs | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/core-shared/src/conformance/define-feature.ts b/packages/core-shared/src/conformance/define-feature.ts index a46703b..61fc2b3 100644 --- a/packages/core-shared/src/conformance/define-feature.ts +++ b/packages/core-shared/src/conformance/define-feature.ts @@ -11,6 +11,7 @@ export type UseCaseManifest = { readonly audits: readonly string[]; readonly publishes: readonly string[]; readonly consumes: readonly string[]; + readonly analyticsEvents?: readonly string[]; }; /** diff --git a/turbo/generators/templates/feature/src/feature.manifest.ts.hbs b/turbo/generators/templates/feature/src/feature.manifest.ts.hbs index 901cf6d..877346c 100644 --- a/turbo/generators/templates/feature/src/feature.manifest.ts.hbs +++ b/turbo/generators/templates/feature/src/feature.manifest.ts.hbs @@ -20,6 +20,7 @@ export const {{camelCase name}}Manifest = defineFeature({ audits: [], publishes: [], consumes: [], + analyticsEvents: [], }, }, realtimeChannels: [],