The `checkpoint-client` is a TypeScript client library designed to integrate version checking and security alerting into command-line interface (CLI) tools. It connects to a Checkpoint Server to fetch the latest version information and notify users of any security vulnerabilities relevant to their installed product. Currently, version 1.1.33 is stable, and while no explicit release cadence is detailed, such clients typically update in conjunction with the products they monitor, like Prisma. A key differentiator is its design to be non-intrusive, ensuring "no impact on the developer experience of your CLI," allowing easy integration into various products, and supporting custom styling. As of the current documentation, it exclusively supports the `prisma` product, requiring specific product and version strings, along with unique hashes for CLI and project paths to function correctly.
npm install checkpoint-clientVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to perform a version and security check using `checkpoint-client`. It shows how to correctly import the library, construct the required `Input` object including dynamically generated hashes for `cli_path_hash` and `project_hash`, and handle the `Result` object for updates or security notices.
Always set `product: 'prisma'` in the input object when calling `checkpoint.check()`.
Ensure `cli_path_hash` and `project_hash` are generated (e.g., using `crypto.createHash`) and included in the input object for `checkpoint.check()`.
Always include `disable: false` in the `checkpoint.check()` input object if you intend for the client to perform a check.
Provide `product: 'prisma'` in the input object.
Generate a SHA256 hash of the CLI installation path and include it as `cli_path_hash` in the input.
Ensure you are using `import checkpoint from 'checkpoint-client'` for TypeScript or ES module environments.
No dependency data recorded yet.