@mablhq/mabl-cli 2.72.41 → 2.72.44

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mablhq/mabl-cli",
3
- "version": "2.72.41",
3
+ "version": "2.72.44",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "The official mabl command line interface tool",
6
6
  "main": "index.js",
package/util/analytics.js CHANGED
@@ -33,6 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.trackMcpEvent = trackMcpEvent;
36
37
  exports.trackCliEvent = trackCliEvent;
37
38
  exports.trackExternalToolEvent = trackExternalToolEvent;
38
39
  exports.trackMablTestsRunnerEvent = trackMablTestsRunnerEvent;
@@ -70,6 +71,26 @@ async function getTrackingInfo() {
70
71
  },
71
72
  };
72
73
  }
74
+ async function trackMcpEvent(command) {
75
+ try {
76
+ const trackingInfo = await getTrackingInfo();
77
+ if (!trackingInfo.userId) {
78
+ return;
79
+ }
80
+ const event = `mablMcp - ${command}`;
81
+ const properties = {
82
+ workspaceId: trackingInfo.workspaceId,
83
+ environment: env_1.ENV,
84
+ isMcp: true,
85
+ };
86
+ await trackEvent(event, trackingInfo.userId, properties);
87
+ }
88
+ catch (error) {
89
+ if (env_1.ENV === 'local' || env_1.ENV === 'dev') {
90
+ loggingProvider_1.logger.error('Error with Segment event', error);
91
+ }
92
+ }
93
+ }
73
94
  async function trackCliEvent(commands, argumentCountMap) {
74
95
  try {
75
96
  const trackingInfo = await getTrackingInfo();