
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@exo-tech-xyz/validators
Advanced tools
This package offers a set of validation rules for Kinobi IDLs to ensure that they are correctly formatted.
pnpm install @exo-tech-xyz/validators
[!NOTE] This package is included in the main
kinobi
package. Meaning, you already have access to its content if you are installing Kinobi this way.pnpm install kinobi
ValidationItem
A validation item describes a single piece of information — typically a warning or an error — about a node in the Kinobi IDL.
type ValidationItem = {
// The level of importance of a validation item.
level: 'debug' | 'trace' | 'info' | 'warn' | 'error';
// A human-readable message describing the issue or information.
message: string;
// The node that the validation item is related to.
node: Node;
// The stack of nodes that led to the node above.
stack: readonly Node[];
};
getValidationItemsVisitor(visitor)
The getValidationItemsVisitor
function returns a visitor that collects all validation items from a Kinobi IDL. Note that this visitor is still a work in progress and does not cover all validation rules.
import { getValidationItemsVisitor } from '@exo-tech-xyz/validators';
const validationItems = kinobi.accept(getValidationItemsVisitor());
throwValidatorItemsVisitor(visitor)
The throwValidatorItemsVisitor
function accepts a Visitor<ValidationItemp[]>
and throws an error if any validation items above a certain level are found. By default, the level is set to 'error'
but a second argument can be passed to change it.
import { throwValidatorItemsVisitor, getValidationItemsVisitor } from '@exo-tech-xyz/validators';
// Throw if any "error" items are found.
kinobi.accept(throwValidatorItemsVisitor(getValidationItemsVisitor()));
// Throw if any "warn" or "error" items are found.
kinobi.accept(throwValidatorItemsVisitor(getValidationItemsVisitor(), 'warn'));
FAQs
Validator visitors for the Kinobi framework
We found that @exo-tech-xyz/validators demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.