claude-code-templates 1.14.4 → 1.14.6
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 +15 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-templates",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.6",
|
|
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,8 +22,9 @@ class TrackingService {
|
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
//
|
|
26
|
-
|
|
25
|
+
// Temporarily disable tracking until we fix the endpoint
|
|
26
|
+
// TODO: Re-enable when tracking endpoint is working
|
|
27
|
+
return false;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
/**
|
|
@@ -83,36 +84,27 @@ class TrackingService {
|
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
/**
|
|
86
|
-
* Send tracking data
|
|
87
|
+
* Send tracking data to Vercel serverless function (anonymous)
|
|
87
88
|
*/
|
|
88
89
|
async sendTrackingData(trackingData) {
|
|
89
90
|
const controller = new AbortController();
|
|
90
91
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
91
92
|
|
|
92
93
|
try {
|
|
93
|
-
// Use
|
|
94
|
-
const response = await fetch(
|
|
94
|
+
// Use Vercel serverless function (no auth needed)
|
|
95
|
+
const response = await fetch('https://vercel-tracking-mj8fcml40-daniel-avilas-projects-2d322e1e.vercel.app/api/track', {
|
|
95
96
|
method: 'POST',
|
|
96
97
|
headers: {
|
|
97
98
|
'Content-Type': 'application/json',
|
|
98
|
-
'Accept': 'application/vnd.github.v3+json',
|
|
99
99
|
'User-Agent': 'claude-code-templates-cli'
|
|
100
100
|
},
|
|
101
101
|
body: JSON.stringify({
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
environment: {
|
|
109
|
-
platform: trackingData.environment.platform,
|
|
110
|
-
arch: trackingData.environment.arch,
|
|
111
|
-
node_version: trackingData.environment.node_version,
|
|
112
|
-
cli_version: trackingData.environment.cli_version
|
|
113
|
-
},
|
|
114
|
-
metadata: trackingData.metadata || {}
|
|
115
|
-
}
|
|
102
|
+
component_type: trackingData.component_type,
|
|
103
|
+
component_name: trackingData.component_name,
|
|
104
|
+
timestamp: trackingData.timestamp,
|
|
105
|
+
session_id: trackingData.session_id,
|
|
106
|
+
environment: trackingData.environment,
|
|
107
|
+
metadata: trackingData.metadata || {}
|
|
116
108
|
}),
|
|
117
109
|
signal: controller.signal
|
|
118
110
|
});
|
|
@@ -120,12 +112,13 @@ class TrackingService {
|
|
|
120
112
|
clearTimeout(timeoutId);
|
|
121
113
|
|
|
122
114
|
if (!response.ok) {
|
|
123
|
-
|
|
115
|
+
const errorText = await response.text();
|
|
116
|
+
throw new Error(`Tracking API responded with ${response.status}: ${errorText}`);
|
|
124
117
|
}
|
|
125
118
|
|
|
126
119
|
// Only show success message when debugging
|
|
127
120
|
if (process.env.CCT_DEBUG === 'true') {
|
|
128
|
-
console.debug('📊 Download tracked successfully via
|
|
121
|
+
console.debug('📊 Download tracked successfully via Vercel function');
|
|
129
122
|
}
|
|
130
123
|
|
|
131
124
|
} catch (error) {
|