Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env -S node --no-deprecation

/* eslint-disable n/no-unpublished-bin */

import {execute, settings} from '@oclif/core'

// Enable performance tracking when oclif:perf is specified in DEBUG
Expand All @@ -14,10 +12,9 @@ process.env.HEROKU_UPDATE_INSTRUCTIONS = process.env.HEROKU_UPDATE_INSTRUCTIONS
const now = new Date()
const cliStartTime = now.getTime()

// Skip telemetry entirely on Windows for performance (unless explicitly enabled)
const enableTelemetry = process.platform !== 'win32' || process.env.ENABLE_WINDOWS_TELEMETRY === 'true'
const {isTelemetryEnabled} = await import('../dist/lib/analytics-telemetry/telemetry-utils.js')

if (enableTelemetry) {
if (isTelemetryEnabled()) {
// Dynamically import telemetry modules
const {setupTelemetryHandlers} = await import('../dist/lib/analytics-telemetry/worker-client.js')
const {computeDuration} = await import('../dist/lib/analytics-telemetry/telemetry-utils.js')
Expand All @@ -26,7 +23,7 @@ if (enableTelemetry) {
setupTelemetryHandlers({
cliStartTime,
computeDuration,
enableTelemetry,
enableTelemetry: isTelemetryEnabled(),
})
}

Expand Down
105 changes: 96 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"bin": "./bin/run.js",
"bugs": "https://github.com/heroku/cli/issues",
"dependencies": {
"@heroku-cli/command": "^12.2.2",
"@heroku-cli/command": "^12.3.1",
"@heroku-cli/notifications": "^1.2.6",
"@heroku-cli/schema": "^1.0.25",
"@heroku/buildpack-registry": "^1.0.1",
"@heroku/heroku-cli-util": "^10.7.0",
"@heroku/heroku-cli-util": "^10.8.0",
"@heroku/http-call": "^5.5.1",
"@heroku/mcp-server": "^1.2.0",
"@heroku/socksv5": "^0.0.9",
Expand Down
Loading
Loading