claude-code-templates 1.14.6 → 1.14.7
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 +1 -1
- package/src/tracking-service.js +22 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-templates",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.7",
|
|
4
4
|
"description": "CLI tool to setup Claude Code configurations with framework-specific commands, automation hooks and MCP Servers for your projects",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
package/src/tracking-service.js
CHANGED
|
@@ -22,9 +22,8 @@ class TrackingService {
|
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
return false;
|
|
25
|
+
// Enable public telemetry tracking
|
|
26
|
+
return true;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
/**
|
|
@@ -84,46 +83,43 @@ class TrackingService {
|
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
/**
|
|
87
|
-
* Send tracking data
|
|
86
|
+
* Send tracking data via public telemetry endpoint (like Google Analytics)
|
|
88
87
|
*/
|
|
89
88
|
async sendTrackingData(trackingData) {
|
|
90
89
|
const controller = new AbortController();
|
|
91
90
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
92
91
|
|
|
93
92
|
try {
|
|
94
|
-
//
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
metadata: trackingData.metadata || {}
|
|
108
|
-
}),
|
|
93
|
+
// Build query parameters for GET request (like image tracking)
|
|
94
|
+
const params = new URLSearchParams({
|
|
95
|
+
type: trackingData.component_type,
|
|
96
|
+
name: trackingData.component_name,
|
|
97
|
+
platform: trackingData.environment.platform || 'unknown',
|
|
98
|
+
cli: trackingData.environment.cli_version || 'unknown',
|
|
99
|
+
session: trackingData.session_id.substring(0, 8) // Only first 8 chars for privacy
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// Use public telemetry endpoint (no auth needed, returns GIF)
|
|
103
|
+
await fetch(`https://vercel-tracking-m1wrh55ev-daniel-avilas-projects-2d322e1e.vercel.app/api/telemetry?${params}`, {
|
|
104
|
+
method: 'GET',
|
|
105
|
+
mode: 'no-cors', // Prevents CORS errors
|
|
109
106
|
signal: controller.signal
|
|
110
107
|
});
|
|
111
108
|
|
|
112
109
|
clearTimeout(timeoutId);
|
|
113
110
|
|
|
114
|
-
|
|
115
|
-
const errorText = await response.text();
|
|
116
|
-
throw new Error(`Tracking API responded with ${response.status}: ${errorText}`);
|
|
117
|
-
}
|
|
118
|
-
|
|
111
|
+
// No need to check response with no-cors mode
|
|
119
112
|
// Only show success message when debugging
|
|
120
113
|
if (process.env.CCT_DEBUG === 'true') {
|
|
121
|
-
console.debug('📊 Download tracked successfully via
|
|
114
|
+
console.debug('📊 Download tracked successfully via telemetry');
|
|
122
115
|
}
|
|
123
116
|
|
|
124
117
|
} catch (error) {
|
|
125
118
|
clearTimeout(timeoutId);
|
|
126
|
-
|
|
119
|
+
// Silent fail - tracking should never break user experience
|
|
120
|
+
if (process.env.CCT_DEBUG === 'true') {
|
|
121
|
+
console.debug('📊 Tracking failed (non-critical):', error.message);
|
|
122
|
+
}
|
|
127
123
|
}
|
|
128
124
|
}
|
|
129
125
|
|