feat(telemetry): require explicit opt-in

This commit is contained in:
Turtle
2026-08-10 21:57:56 +08:00
parent 504e96a049
commit e6eb44ed2a
53 files changed
+265 -370

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@ export const PROFILE_ROOT_FILENAME = 'cordis.yml'
* switch set.
* @param disabledEnv - the raw `DSH_TELEMETRY_DISABLED` value (`undefined` when unset).
* @param hasRow - whether the composition carries the telemetry row.
* @returns the disable patch, or `undefined` when telemetry stays enabled or is not mounted.
* @returns the disable patch, or `undefined` when no hard-disable patch is required.
*/
export function resolveTelemetryPatch(disabledEnv: string | undefined, hasRow: boolean): PatchOptions | undefined {
if ((disabledEnv ?? '') === '' || !hasRow) return undefined