amplitude / amplitude/Amplitude-TypeScript

Ampli CLI `API_URL` and `APP_ENV` env var conflicts

Đang mở
#600 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
TypeScript
Star
180
Fork
68
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
29

Mô tả

Since the `@amplitude/ampli` CLI library is not on GitHub (why?), I'm opening this issue here.

The `ampli` CLI for some reason references environment variables in emitted code and unfortunately at least three of the env vars it references are named too generically: `process.env.API_URL`, `process.env.APP_ENV`, `process.env.APP_URL`. I would highly suggest changing those env vars to be scoped to the `ampli` library, e.g. `AMPLI_CLI_API_URL`, `AMPLI_CLI_APP_ENV`, `AMPLI_CLI_APP_URL` or similar. _OR_, better yet, don't ship package code that reads env vars - specifically to avoid issues like this. Instead, always make config injectable.

Version: `@amplitude/ampli 1.34.0`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.