The `blade-client` package provides a robust and type-safe client for accessing and querying data from your RONIN database. Currently at version 3.29.10, this library is designed for ease of use and integrates seamlessly into modern JavaScript and TypeScript projects, including those targeting edge and serverless environments. While an explicit release cadence isn't stated, the frequent version updates suggest active development and maintenance. Its key differentiator is its direct, strongly-typed access to RONIN databases, abstracting complex database interactions into a developer-friendly API that includes ORM-like query, insert, and update operations. It's built to be a reliable solution for applications requiring efficient and secure data retrieval and manipulation from RONIN backends.
npm install blade-clientVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the RONIN client, perform basic `SELECT` queries, `INSERT` new records, and `UPDATE` existing ones. It includes error handling and assumes an environment variable for the API key.
Upgrade your Node.js environment to version 18.17.0 or newer. Use `nvm` or `volta` for easy version management.
Always use `await` when calling asynchronous `blade-client` methods within an `async` function, and ensure proper `try...catch` blocks for robust error handling.
For contributors, ensure `bun` is installed and used for `install` and `link` commands. Delete `package-lock.json` before creating a pull request and rely solely on `bun.lockb`.
Follow best practices for your deployment environment. Typically, a single `RONINClient` instance should be reused across requests (e.g., initialized once per serverless function instance or application lifecycle), rather than creating a new one for every operation.
Switch to ES module `import` syntax: `import { RONINClient } from 'blade-client';`.Verify that `process.env.RONIN_API_KEY` is correctly set with a valid RONIN API key. Ensure that the database endpoint (if explicitly configured) is correct and reachable from your environment. Check network logs for connection refusal or timeout errors.
Ensure `RONINClient` is correctly imported and instantiated with `new RONINClient(...)`. Double-check the method names and their casing against the library's documentation. If using TypeScript, ensure your environment is correctly set up to catch type errors during compilation.