INNER CODE UNIT · TypeScript
collectInstallInfo
hypermodeinc/modus · cli/src/commands/new/index.ts:161
private async collectInstallInfo(sdk: string, sdkVersion: string) {
try {
// Skip metrics collection if environment variables are set
if (process.env.SCARF_NO_ANALYTICS !== "true" && process.env.DO_NOT_TRACK !== "true") {
const version = this.config.version;
const platform = os.platform();
const arch = os.arch();
const nodeVersion = process.version;
const variables: string[] = [version.toLowerCase(), platform.toLowerCase(), arch.toLowerCase(), nodeVersion.toLowerCase(), sdk.toLowerCase(), sdkVersion.toLowerCase()];
await http.get(`https://${SCARF_ENDPOINT}.scarf.sh/${variables.join("/")}`);
}
} catch (_error) {
// Fail silently if an error occurs during the analytics call
}
}