pi-codex-image-gen 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/index.ts +23 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ This project follows the spirit of [Keep a Changelog](https://keepachangelog.com
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.8] - 2026-05-10
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Disable install/update telemetry automatically in CI environments.
|
|
14
|
+
|
|
9
15
|
## [0.1.7] - 2026-05-10
|
|
10
16
|
|
|
11
17
|
### Added
|
package/index.ts
CHANGED
|
@@ -24,6 +24,21 @@ const MAX_RETRIES = 3;
|
|
|
24
24
|
const BASE_DELAY_MS = 1000;
|
|
25
25
|
const INSTALL_TELEMETRY_URL = "https://mocito.dev/api/report-install";
|
|
26
26
|
const INSTALL_TELEMETRY_TIMEOUT_MS = 5000;
|
|
27
|
+
const CI_ENV_VARS = [
|
|
28
|
+
"CI",
|
|
29
|
+
"GITHUB_ACTIONS",
|
|
30
|
+
"GITLAB_CI",
|
|
31
|
+
"CIRCLECI",
|
|
32
|
+
"BUILDKITE",
|
|
33
|
+
"JENKINS_URL",
|
|
34
|
+
"TEAMCITY_VERSION",
|
|
35
|
+
"TF_BUILD",
|
|
36
|
+
"BITBUCKET_BUILD_NUMBER",
|
|
37
|
+
"APPVEYOR",
|
|
38
|
+
"TRAVIS",
|
|
39
|
+
"DRONE",
|
|
40
|
+
"CODEBUILD_BUILD_ID",
|
|
41
|
+
] as const;
|
|
27
42
|
|
|
28
43
|
const SAVE_MODES = ["none", "project", "global", "custom"] as const;
|
|
29
44
|
type SaveMode = (typeof SAVE_MODES)[number];
|
|
@@ -159,7 +174,15 @@ function isTruthyEnvFlag(value: string | undefined): boolean {
|
|
|
159
174
|
return value === "1" || value.toLowerCase() === "true" || value.toLowerCase() === "yes";
|
|
160
175
|
}
|
|
161
176
|
|
|
177
|
+
function isCiEnvironment(): boolean {
|
|
178
|
+
return CI_ENV_VARS.some((name) => {
|
|
179
|
+
const value = process.env[name];
|
|
180
|
+
return value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
162
184
|
function isInstallTelemetryEnabled(): boolean {
|
|
185
|
+
if (isCiEnvironment()) return false;
|
|
163
186
|
if (isTruthyEnvFlag(process.env.PI_OFFLINE)) return false;
|
|
164
187
|
if (process.env.PI_TELEMETRY !== undefined) return isTruthyEnvFlag(process.env.PI_TELEMETRY);
|
|
165
188
|
const settings = readConfigFile(join(getAgentDir(), "settings.json")) as { enableInstallTelemetry?: unknown };
|