create-mastra 1.10.3-alpha.1 → 1.10.3-alpha.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # create-mastra
2
2
 
3
+ ## 1.10.3-alpha.2
4
+
3
5
  ## 1.10.3-alpha.1
4
6
 
5
7
  ## 1.10.3-alpha.0
package/dist/index.js CHANGED
@@ -15456,18 +15456,21 @@ function getAnalytics() {
15456
15456
  function setAnalytics(instance) {
15457
15457
  analyticsInstance = instance;
15458
15458
  }
15459
- var PosthogAnalytics = class {
15460
- sessionId;
15459
+ var PosthogAnalytics = class _PosthogAnalytics {
15460
+ sessionId = "";
15461
15461
  client;
15462
- distinctId;
15462
+ distinctId = "";
15463
15463
  version;
15464
- packageManager;
15464
+ packageManager = "";
15465
15465
  constructor({
15466
15466
  version,
15467
15467
  apiKey,
15468
15468
  host = "https://app.posthog.com"
15469
15469
  }) {
15470
15470
  this.version = version;
15471
+ if (!_PosthogAnalytics.isTelemetryEnabled()) {
15472
+ return;
15473
+ }
15471
15474
  this.packageManager = getPackageManager();
15472
15475
  const cliConfigPath = path.join(__dirname$1, "mastra-cli.json");
15473
15476
  if (existsSync(cliConfigPath)) {
@@ -15491,9 +15494,7 @@ var PosthogAnalytics = class {
15491
15494
  sessionId: this.sessionId
15492
15495
  });
15493
15496
  }
15494
- if (this.isTelemetryEnabled()) {
15495
- this.initializePostHog(apiKey, host);
15496
- }
15497
+ this.initializePostHog(apiKey, host);
15497
15498
  }
15498
15499
  writeCliConfig({ distinctId, sessionId }) {
15499
15500
  try {
@@ -15514,8 +15515,9 @@ var PosthogAnalytics = class {
15514
15515
  });
15515
15516
  });
15516
15517
  }
15517
- isTelemetryEnabled() {
15518
- if (process.env.MASTRA_TELEMETRY_DISABLED) {
15518
+ static isTelemetryEnabled() {
15519
+ const value = process.env.MASTRA_TELEMETRY_DISABLED;
15520
+ if (value && ["1", "true", "yes"].includes(value.trim().toLowerCase())) {
15519
15521
  return false;
15520
15522
  }
15521
15523
  return true;
@@ -15790,7 +15792,7 @@ var PinoLogger = class _PinoLogger extends MastraLogger {
15790
15792
  };
15791
15793
 
15792
15794
  var package_default = {
15793
- version: "1.10.3-alpha.1"};
15795
+ version: "1.10.3-alpha.2"};
15794
15796
  var logger = createLogger(false);
15795
15797
  function createLogger(debug = false) {
15796
15798
  return new PinoLogger({