create-mastra 1.10.2 → 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,11 @@
1
1
  # create-mastra
2
2
 
3
+ ## 1.10.3-alpha.2
4
+
5
+ ## 1.10.3-alpha.1
6
+
7
+ ## 1.10.3-alpha.0
8
+
3
9
  ## 1.10.2
4
10
 
5
11
  ## 1.10.2-alpha.0
package/dist/index.js CHANGED
@@ -15350,6 +15350,7 @@ Top-level files define how your Mastra project is configured, built, and connect
15350
15350
  - Load the \`mastra\` skill before any Mastra-related work
15351
15351
  - Register new agents, tools, workflows, and scorers in \`src/mastra/index.ts\`
15352
15352
  - Use schemas for tool inputs and outputs
15353
+ - Use package scripts such as \`npm run dev\` instead of running \`mastra dev\` directly, so the local project dependency is used instead of any global install
15353
15354
  - Run \`npm run build\` to verify changes compile
15354
15355
 
15355
15356
  ### Never do
@@ -15455,18 +15456,21 @@ function getAnalytics() {
15455
15456
  function setAnalytics(instance) {
15456
15457
  analyticsInstance = instance;
15457
15458
  }
15458
- var PosthogAnalytics = class {
15459
- sessionId;
15459
+ var PosthogAnalytics = class _PosthogAnalytics {
15460
+ sessionId = "";
15460
15461
  client;
15461
- distinctId;
15462
+ distinctId = "";
15462
15463
  version;
15463
- packageManager;
15464
+ packageManager = "";
15464
15465
  constructor({
15465
15466
  version,
15466
15467
  apiKey,
15467
15468
  host = "https://app.posthog.com"
15468
15469
  }) {
15469
15470
  this.version = version;
15471
+ if (!_PosthogAnalytics.isTelemetryEnabled()) {
15472
+ return;
15473
+ }
15470
15474
  this.packageManager = getPackageManager();
15471
15475
  const cliConfigPath = path.join(__dirname$1, "mastra-cli.json");
15472
15476
  if (existsSync(cliConfigPath)) {
@@ -15490,9 +15494,7 @@ var PosthogAnalytics = class {
15490
15494
  sessionId: this.sessionId
15491
15495
  });
15492
15496
  }
15493
- if (this.isTelemetryEnabled()) {
15494
- this.initializePostHog(apiKey, host);
15495
- }
15497
+ this.initializePostHog(apiKey, host);
15496
15498
  }
15497
15499
  writeCliConfig({ distinctId, sessionId }) {
15498
15500
  try {
@@ -15513,8 +15515,9 @@ var PosthogAnalytics = class {
15513
15515
  });
15514
15516
  });
15515
15517
  }
15516
- isTelemetryEnabled() {
15517
- 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())) {
15518
15521
  return false;
15519
15522
  }
15520
15523
  return true;
@@ -15671,7 +15674,7 @@ var MastraLogger = class {
15671
15674
  if (!transportId || !this.transports.has(transportId)) {
15672
15675
  return { logs: [], total: 0, page: params?.page ?? 1, perPage: params?.perPage ?? 100, hasMore: false };
15673
15676
  }
15674
- return this.transports.get(transportId).listLogs(params) ?? {
15677
+ return this.transports.get(transportId).listLogs?.(params) ?? {
15675
15678
  logs: [],
15676
15679
  total: 0,
15677
15680
  page: params?.page ?? 1,
@@ -15692,7 +15695,7 @@ var MastraLogger = class {
15692
15695
  if (!transportId || !this.transports.has(transportId) || !runId) {
15693
15696
  return { logs: [], total: 0, page: page ?? 1, perPage: perPage ?? 100, hasMore: false };
15694
15697
  }
15695
- return this.transports.get(transportId).listLogsByRunId({ runId, fromDate, toDate, logLevel, filters, page, perPage }) ?? {
15698
+ return this.transports.get(transportId).listLogsByRunId?.({ runId, fromDate, toDate, logLevel, filters, page, perPage }) ?? {
15696
15699
  logs: [],
15697
15700
  total: 0,
15698
15701
  page: page ?? 1,
@@ -15789,7 +15792,7 @@ var PinoLogger = class _PinoLogger extends MastraLogger {
15789
15792
  };
15790
15793
 
15791
15794
  var package_default = {
15792
- version: "1.10.2"};
15795
+ version: "1.10.3-alpha.2"};
15793
15796
  var logger = createLogger(false);
15794
15797
  function createLogger(debug = false) {
15795
15798
  return new PinoLogger({