File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,14 @@ const path = require('path');
66
77// Replace telemetry token in generated bundle files after building
88function replaceTelemetryTokenInBundle ( ) {
9- const telemetryToken = process . env . TELEMETRY_TRACKING_TOKEN ;
9+ const telemetryToken = process . env . VSCODE_TELEMETRY_TRACKING_TOKEN ;
1010 if ( ! telemetryToken ) {
11- console . error ( 'Error: TELEMETRY_TRACKING_TOKEN environment variable is not set' ) ;
11+ console . error ( 'Error: VSCODE_TELEMETRY_TRACKING_TOKEN environment variable is not set' ) ;
1212 process . exit ( 1 ) ;
1313 }
1414 const file = 'bundle/extension.js' ;
1515 let content = fs . readFileSync ( file , 'utf-8' ) ;
16- content = content . replace ( '<TELEMETRY_TRACKING_TOKEN >' , telemetryToken ) ;
16+ content = content . replace ( '<VSCODE_TELEMETRY_TRACKING_TOKEN >' , telemetryToken ) ;
1717 fs . writeFileSync ( file , content , 'utf-8' ) ;
1818}
1919
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ import * as os from 'os';
33import * as vscode from 'vscode' ;
44import { getMachineId } from '../utils/machine-id-utils' ;
55import { v5 as uuidv5 } from 'uuid' ;
6- import { TELEMETRY_TRACKING_TOKEN } from '../constants' ;
6+
7+ export const VSCODE_TELEMETRY_TRACKING_TOKEN = '<VSCODE_TELEMETRY_TRACKING_TOKEN>' ;
78
89export type TelemetryEvents =
910 | 'extension:activate'
@@ -28,7 +29,7 @@ export class VSCodeTelemetry {
2829
2930 constructor ( ) {
3031 if ( vscode . env . isTelemetryEnabled ) {
31- this . mixpanel = init ( TELEMETRY_TRACKING_TOKEN , {
32+ this . mixpanel = init ( VSCODE_TELEMETRY_TRACKING_TOKEN , {
3233 geolocate : true ,
3334 } ) ;
3435 }
You can’t perform that action at this time.
0 commit comments