create-mastra 1.28.1-alpha.3 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -12308,6 +12308,22 @@ var PosthogAnalytics = class PosthogAnalytics2 {
12308
12308
  throw error;
12309
12309
  }
12310
12310
  }
12311
+ /**
12312
+ * Evaluate a PostHog feature flag. Platform flags can override the CLI's
12313
+ * anonymous telemetry id with the authenticated platform identity while
12314
+ * retaining organization group context. Fails closed on any error.
12315
+ */
12316
+ async isFeatureEnabled(flag, options) {
12317
+ if (!this.client) return false;
12318
+ try {
12319
+ return (await this.client.evaluateFlags(options?.distinctId ?? this.distinctId, {
12320
+ groups: options?.groups,
12321
+ flagKeys: [flag]
12322
+ })).getFlag(flag) === true;
12323
+ } catch {
12324
+ return false;
12325
+ }
12326
+ }
12311
12327
  async shutdown(timeoutMs) {
12312
12328
  if (!this.client) return;
12313
12329
  try {