@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/commands/mcp/mcp_cmds/tools/getApplications.js +13 -11
- package/commands/mcp/mcp_cmds/tools/getCredentials.js +10 -8
- package/commands/mcp/mcp_cmds/tools/getLatestAuthoredTests.js +3 -2
- package/commands/mcp/mcp_cmds/tools/getTestResults.js +11 -9
- package/commands/mcp/mcp_cmds/tools/getTests.js +4 -3
- package/commands/mcp/mcp_cmds/tools/getWorkspaces.js +9 -9
- package/commands/mcp/mcp_cmds/tools/interceptor.js +7 -0
- package/commands/mcp/mcp_cmds/tools/mcpMablTool.js +9 -1
- package/execution/index.js +1 -1
- package/package.json +1 -1
- package/util/analytics.js +21 -0
package/package.json
CHANGED
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();
|