claude-code-templates 1.14.4 → 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.4",
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,36 +83,27 @@ class TrackingService {
83
83
  }
84
84
 
85
85
  /**
86
- * Send tracking data via GitHub Repository Dispatch (anonymous)
86
+ * Send tracking data to Vercel serverless function (anonymous)
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
- // Use GitHub Repository Dispatch API (public endpoint, no auth needed)
94
- const response = await fetch(`https://api.github.com/repos/${this.repoOwner}/${this.repoName}/dispatches`, {
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', {
95
95
  method: 'POST',
96
96
  headers: {
97
97
  'Content-Type': 'application/json',
98
- 'Accept': 'application/vnd.github.v3+json',
99
98
  'User-Agent': 'claude-code-templates-cli'
100
99
  },
101
100
  body: JSON.stringify({
102
- event_type: 'component_download',
103
- client_payload: {
104
- component_type: trackingData.component_type,
105
- component_name: trackingData.component_name,
106
- timestamp: trackingData.timestamp,
107
- session_id: trackingData.session_id,
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
- }
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 || {}
116
107
  }),
117
108
  signal: controller.signal
118
109
  });
@@ -120,12 +111,13 @@ class TrackingService {
120
111
  clearTimeout(timeoutId);
121
112
 
122
113
  if (!response.ok) {
123
- throw new Error(`GitHub Dispatch API responded with ${response.status}`);
114
+ const errorText = await response.text();
115
+ throw new Error(`Tracking API responded with ${response.status}: ${errorText}`);
124
116
  }
125
117
 
126
118
  // Only show success message when debugging
127
119
  if (process.env.CCT_DEBUG === 'true') {
128
- console.debug('📊 Download tracked successfully via repository dispatch');
120
+ console.debug('📊 Download tracked successfully via Vercel function');
129
121
  }
130
122
 
131
123
  } catch (error) {