amplitude / amplitude/Amplitude-TypeScript

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

オープン
#600 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
180
フォーク
68
平均マージ
3日 1時間
マージ済み PR(30日)
29

説明

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`

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。