🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@prisma-next/cli-telemetry

Package Overview
Dependencies
Maintainers
4
Versions
327
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma-next/cli-telemetry

CLI telemetry client for Prisma Next: detached subprocess sender, gating resolution, user-config store, and consent surface

Source
npmnpm
Version
0.15.0-dev.11
Version published
Weekly downloads
21K
15.87%
Maintainers
4
Weekly downloads
 
Created
Source

@prisma-next/cli-telemetry

Anonymous CLI usage telemetry client for Prisma Next. Runs in a detached child process at command start, never blocks the parent, and silently swallows every error in the sending path.

Responsibilities

  • User config store. Read/write $XDG_CONFIG_HOME/prisma-next/config.json (or platform equivalent), holding the consent flag (enableTelemetry) and the per-installation random UUID (installationId). Atomic writes; unknown fields preserved.
  • Gating. Pure-function resolution over the two opt-out env vars (PRISMA_NEXT_DISABLE_TELEMETRY, DO_NOT_TRACK=1), the stored preference, and the default-off fallback when the file is missing.
  • Sanitization. Project the parent's parsed commander result into the command name plus the array of flag names; never values, never positionals.
  • Agent detection. Best-effort identification of AI coding-agent sessions from an env-var allowlist. Detector runs in the child.
  • Detached send. Fork the sender script via child_process.fork(..., { detached: true, stdio: ['pipe','ignore','ignore','ipc'] }), pipe the payload over IPC, disconnect() + unref(), return to the parent. The child enriches with system probes, POSTs to the backend with a 1–2 s timeout, exits.

Dependencies

  • Node built-ins only. Config-dir resolution follows the XDG Base Directory Specification on Unix (incl. macOS — the spec deliberately picks XDG over the macOS-native ~/Library/Preferences/ convention so the path is test-overridable and consistent across platforms) and uses %APPDATA% on Windows. child_process, node:crypto.randomUUID, node:fs, node:os, node:path are the only inbound modules.

For contributors

The endpoint URL is a module-level constant pinned to the deployed backend. For local-development testing, set PRISMA_NEXT_TELEMETRY_ENDPOINT to override the destination URL (used by the integration tests to spin up a mock HTTP server on an ephemeral port). This is an integration-testing affordance, not a public knob: do not surface it in user-facing docs.

FAQs

Package last updated on 17 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts