claude-code-templates 1.14.3 → 1.14.5

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": "claude-code-templates",
3
- "version": "1.14.3",
3
+ "version": "1.14.5",
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": {
@@ -83,37 +83,27 @@ class TrackingService {
83
83
  }
84
84
 
85
85
  /**
86
- * Send tracking data to GitHub Issues (async, non-blocking)
86
+ * Send tracking data to Vercel serverless function (anonymous)
87
87
  */
88
88
  async sendTrackingData(trackingData) {
89
- const title = `📊 ${trackingData.component_type}:${trackingData.component_name} - ${trackingData.timestamp.split('T')[0]}`;
90
-
91
- const body = `\`\`\`json
92
- ${JSON.stringify(trackingData, null, 2)}
93
- \`\`\`
94
-
95
- <!-- ANALYTICS_DATA -->
96
- Component: **${trackingData.component_name}** (${trackingData.component_type})
97
- Platform: ${trackingData.environment.platform} ${trackingData.environment.arch}
98
- Node: ${trackingData.environment.node_version}
99
- CLI: ${trackingData.environment.cli_version}
100
- Session: \`${trackingData.session_id}\`
101
- `;
102
-
103
89
  const controller = new AbortController();
104
90
  const timeoutId = setTimeout(() => controller.abort(), this.timeout);
105
91
 
106
92
  try {
107
- const response = await fetch(`https://api.github.com/repos/${this.repoOwner}/${this.repoName}/issues`, {
93
+ // Use Vercel serverless function (no auth needed)
94
+ const response = await fetch('https://vercel-tracking-mj8fcml40-daniel-avilas-projects-2d322e1e.vercel.app/api/track', {
108
95
  method: 'POST',
109
96
  headers: {
110
97
  'Content-Type': 'application/json',
111
98
  'User-Agent': 'claude-code-templates-cli'
112
99
  },
113
100
  body: JSON.stringify({
114
- title: title,
115
- body: body,
116
- labels: ['📊 analytics', 'download-tracking', `type:${trackingData.component_type}`]
101
+ component_type: trackingData.component_type,
102
+ component_name: trackingData.component_name,
103
+ timestamp: trackingData.timestamp,
104
+ session_id: trackingData.session_id,
105
+ environment: trackingData.environment,
106
+ metadata: trackingData.metadata || {}
117
107
  }),
118
108
  signal: controller.signal
119
109
  });
@@ -121,12 +111,13 @@ Session: \`${trackingData.session_id}\`
121
111
  clearTimeout(timeoutId);
122
112
 
123
113
  if (!response.ok) {
124
- throw new Error(`GitHub API responded with ${response.status}`);
114
+ const errorText = await response.text();
115
+ throw new Error(`Tracking API responded with ${response.status}: ${errorText}`);
125
116
  }
126
117
 
127
118
  // Only show success message when debugging
128
119
  if (process.env.CCT_DEBUG === 'true') {
129
- console.debug('📊 Download tracked successfully');
120
+ console.debug('📊 Download tracked successfully via Vercel function');
130
121
  }
131
122
 
132
123
  } catch (error) {