claude-code-templates 1.14.5 → 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 +21 -24
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,7 +22,7 @@ class TrackingService {
|
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
// Enable
|
|
25
|
+
// Enable public telemetry tracking
|
|
26
26
|
return true;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -83,46 +83,43 @@ class TrackingService {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* Send tracking data
|
|
86
|
+
* Send tracking data via public telemetry endpoint (like Google Analytics)
|
|
87
87
|
*/
|
|
88
88
|
async sendTrackingData(trackingData) {
|
|
89
89
|
const controller = new AbortController();
|
|
90
90
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
91
91
|
|
|
92
92
|
try {
|
|
93
|
-
//
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
metadata: trackingData.metadata || {}
|
|
107
|
-
}),
|
|
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
|
|
108
106
|
signal: controller.signal
|
|
109
107
|
});
|
|
110
108
|
|
|
111
109
|
clearTimeout(timeoutId);
|
|
112
110
|
|
|
113
|
-
|
|
114
|
-
const errorText = await response.text();
|
|
115
|
-
throw new Error(`Tracking API responded with ${response.status}: ${errorText}`);
|
|
116
|
-
}
|
|
117
|
-
|
|
111
|
+
// No need to check response with no-cors mode
|
|
118
112
|
// Only show success message when debugging
|
|
119
113
|
if (process.env.CCT_DEBUG === 'true') {
|
|
120
|
-
console.debug('📊 Download tracked successfully via
|
|
114
|
+
console.debug('📊 Download tracked successfully via telemetry');
|
|
121
115
|
}
|
|
122
116
|
|
|
123
117
|
} catch (error) {
|
|
124
118
|
clearTimeout(timeoutId);
|
|
125
|
-
|
|
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
|
+
}
|
|
126
123
|
}
|
|
127
124
|
}
|
|
128
125
|
|