@tanagram/cli 0.5.55 → 0.5.57

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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/install.js CHANGED
@@ -10,10 +10,9 @@ const pkg = require('./package.json');
10
10
  const POSTHOG_KEY = 'phc_sMsUvf0nK50rZdztSlX9rDJqIreLcXj4dyGS0tORQpQ';
11
11
  const POSTHOG_HOST = 'phe.tanagram.ai';
12
12
 
13
- // Generate anonymous distinct ID based on machine
13
+ // Generate anonymous distinct ID based on machine (must match Go CLI convention in metrics/metrics.go)
14
14
  function getDistinctId() {
15
- const machineId = os.hostname() + os.userInfo().username;
16
- return crypto.createHash('sha256').update(machineId).digest('hex').slice(0, 16);
15
+ return 'cli_' + os.hostname();
17
16
  }
18
17
 
19
18
  // Track event to PostHog
@@ -263,7 +262,7 @@ function ensureOpenCode() {
263
262
  const isFirstTimeUser = !fs.existsSync(tanagramDir);
264
263
 
265
264
  // Track install start
266
- track('cli.install.start', { first_time: isFirstTimeUser });
265
+ track('cli.install.start', { first_time: isFirstTimeUser, install_method: 'npm' });
267
266
 
268
267
  try {
269
268
  // Find and install prebuilt binary
@@ -280,12 +279,12 @@ function ensureOpenCode() {
280
279
  ensureOpenCode();
281
280
 
282
281
  // Track install success
283
- track('cli.install.success');
282
+ track('cli.install.success', { install_method: 'npm' });
284
283
 
285
284
  process.exit(0);
286
285
  } catch (error) {
287
286
  console.error('\n❌ Installation failed:', error.message);
288
- track('cli.install.failure', { error: error.message });
287
+ track('cli.install.failure', { error: error.message, install_method: 'npm' });
289
288
  process.exit(1);
290
289
  }
291
290
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanagram/cli",
3
- "version": "0.5.55",
3
+ "version": "0.5.57",
4
4
  "description": "Tanagram - Catch sloppy code before it ships",
5
5
  "main": "index.js",
6
6
  "bin": {