Files
pmg/internal/analytics/event.go
T
31f23fd065 Add support for package executors and support for PTY handling (#100)
* define contract for package executors

* introduce npx executor

* add npx and pnpx cmd support

* fix typo

* rm PackageExecutor and depend on PackageManager interface

* add support for PTY to handle parent-child process interaction

* refactor PTY handling in proxy flow

* enforce interactiveSession interface check

* close reader explicitly and clean npm version for pkg executors

* rm interaction from interceptors

* add docs and wait for outputRouter before exit

* add support for non interactive TTY for proxy mode

* add support for CI env var check for non interactive tty proxy mode

* update readme to include npx, pnpx support

* Update internal/flows/proxy_flow.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com>

* update ptyx lib

* fix docs typo

---------

Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-09 22:03:42 +05:30

77 lines
1.5 KiB
Go

package analytics
const (
eventRun = "pmg_command_run"
eventCommandNpm = "pmg_command_npm"
eventCommandBun = "pmg_command_bun"
eventCommandPnpm = "pmg_command_pnpm"
eventCommandYarn = "pmg_command_yarn"
eventCommandPip = "pmg_command_pip"
eventCommandPip3 = "pmg_command_pip3"
eventCommandUv = "pmg_command_uv"
eventCommandPoetry = "pmg_command_poetry"
eventCommandNpx = "pmg_command_npx"
eventCommandPnpx = "pmg_command_pnpx"
eventPmgGenerateEnvDocker = "pmg_command_generate_env_docker"
eventPmgGenerateEnvGitHubActions = "pmg_command_generate_env_github_actions"
eventPmgGenerateEnvGitLabCI = "pmg_command_generate_env_gitlab_ci"
)
func TrackCommandRun() {
TrackEvent(eventRun)
}
func TrackCommandNpm() {
TrackEvent(eventCommandNpm)
}
func TrackCommandNpx() {
TrackEvent(eventCommandNpx)
}
func TrackCommandPnpx() {
TrackEvent(eventCommandPnpx)
}
func TrackCommandBun() {
TrackEvent(eventCommandBun)
}
func TrackCommandPnpm() {
TrackEvent(eventCommandPnpm)
}
func TrackCommandYarn() {
TrackEvent(eventCommandYarn)
}
func TrackCommandPip() {
TrackEvent(eventCommandPip)
}
func TrackCommandPip3() {
TrackEvent(eventCommandPip3)
}
func TrackCommandUv() {
TrackEvent(eventCommandUv)
}
func TrackCommandPoetry() {
TrackEvent(eventCommandPoetry)
}
func TrackCommandGenerateEnvDocker() {
TrackEvent(eventPmgGenerateEnvDocker)
}
func TrackCommandGenerateEnvGitHubActions() {
TrackEvent(eventPmgGenerateEnvGitHubActions)
}
func TrackCommandGenerateEnvGitLabCI() {
TrackEvent(eventPmgGenerateEnvGitLabCI)
}