13 KiB
13 KiB
@suaveplan/bitpacker-validation - Bitpacker validation plugin
Summary
Safety limits and validation reports for bitpacker schemas.
Documentation tree
- otel — (no submodules)
- instruments — (no submodules)
- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-validationpackage. Exposes `re…- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-validationpackage. Exposes `re…
- register-schemas — Idempotent integration with
- safety — (no submodules)
- safety-checks — Production-time defensive checks against pathological inputs to the bitpacker — schemas with infinite recursion, arrays…
- safety-checks.schema — Zod schemas for the configuration types of
@suaveplan/bitpacker-validation's safety subsystem:SafetyLimits(the ab… - safety — (no submodules)
- types — Public type companions for
@suaveplan/bitpacker-validation: the validator options bundles, the error class, the error…- types — Public type companions for
@suaveplan/bitpacker-validation: the validator options bundles, the error class, the error…
- types — Public type companions for
- types.schema — Zod schemas for the two configuration shapes accepted by
@suaveplan/bitpacker-validation's public surface: `BitPacker…- types.schema — Zod schemas for the two configuration shapes accepted by
@suaveplan/bitpacker-validation's public surface: `BitPacker…
- types.schema — Zod schemas for the two configuration shapes accepted by
- utils — Type guards and shape-checks shared across the
@suaveplan/bitpacker-validationvalidators. These are the cheap, commo…- utils — Type guards and shape-checks shared across the
@suaveplan/bitpacker-validationvalidators. These are the cheap, commo…
- utils — Type guards and shape-checks shared across the
- validation — (no submodules) - validator — Stateful validator for a fixed `BitPack…
- find-array-length-errors — Per-array length-rule detector used by the recursive
validateDatawalker. Given aBitPackerSchemaarray shape (`[sc… - find-extra-fields — Extra-field detector for the object-schema branch of the recursive
validateDatawalker. Given aBitPackerSchemaobj… - validate-data — The recursive workhorse that drives every validator entry point in
@suaveplan/bitpacker-validation. `validateData(sch… - validation — (no submodules) - validator — Stateful validator for a fixed `BitPack…
- validator — Stateful validator for a fixed
BitPackerSchema.BitPackerValidator<T>is the right choice when a high-throughput pi…
- find-array-length-errors — Per-array length-rule detector used by the recursive
- index — Path:
bitpacker-validation/src/index.tsExport: See source for details.
- safety-checks.schema — Zod schemas for the configuration types of
@suaveplan/bitpacker-validation's safety subsystem:SafetyLimits(the ab… - safety — (no submodules)- validation — (no submodules)- validator — Stateful validator for a fixed `BitPack…
- find-array-length-errors — Per-array length-rule detector used by the recursive
validateDatawalker. Given aBitPackerSchemaarray shape (`[sc… - find-extra-fields — Extra-field detector for the object-schema branch of the recursive
validateDatawalker. Given aBitPackerSchemaobj… - validate-data — The recursive workhorse that drives every validator entry point in
@suaveplan/bitpacker-validation. `validateData(sch… - validation — (no submodules)- validator — Stateful validator for a fixed `BitPack…
- validator — Stateful validator for a fixed
BitPackerSchema.BitPackerValidator<T>is the right choice when a high-throughput pi… - index — Path:
bitpacker-validation/src/index.tsExport: See source for details. - register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-validationpackage. Exposes `re… - types — Public type companions for
@suaveplan/bitpacker-validation: the validator options bundles, the error class, the error… - types.schema — Zod schemas for the two configuration shapes accepted by
@suaveplan/bitpacker-validation's public surface: `BitPacker… - utils — Type guards and shape-checks shared across the
@suaveplan/bitpacker-validationvalidators. These are the cheap, commo… - instruments — (no submodules)- safety — (no submodules)- safety-checks — Production-time defensive checks against pathological inputs to the bitpacker — schemas with infinite recursion, arrays…
- safety-checks.schema — Zod schemas for the configuration types of
@suaveplan/bitpacker-validation's safety subsystem:SafetyLimits(the ab… - safety — (no submodules)- validation — (no submodules)- validator — Stateful validator for a fixed `BitPack…
- find-array-length-errors — Per-array length-rule detector used by the recursive
validateDatawalker. Given aBitPackerSchemaarray shape (`[sc… - find-extra-fields — Extra-field detector for the object-schema branch of the recursive
validateDatawalker. Given aBitPackerSchemaobj… - validate-data — The recursive workhorse that drives every validator entry point in
@suaveplan/bitpacker-validation. `validateData(sch… - validation — (no submodules)- validator — Stateful validator for a fixed `BitPack…
- validator — Stateful validator for a fixed
BitPackerSchema.BitPackerValidator<T>is the right choice when a high-throughput pi…
- safety-checks.schema — Zod schemas for the configuration types of
- index — Path:
bitpacker-validation/src/index.tsExport: See source for details. - register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-validationpackage. Exposes `re… - types — Public type companions for
@suaveplan/bitpacker-validation: the validator options bundles, the error class, the error… - types.schema — Zod schemas for the two configuration shapes accepted by
@suaveplan/bitpacker-validation's public surface: `BitPacker… - utils — Type guards and shape-checks shared across the
@suaveplan/bitpacker-validationvalidators. These are the cheap, commo… - instruments — (no submodules)- safety — (no submodules)- safety-checks — Production-time defensive checks against pathological inputs to the bitpacker — schemas with infinite recursion, arrays…
- safety-checks.schema — Zod schemas for the configuration types of
@suaveplan/bitpacker-validation's safety subsystem:SafetyLimits(the ab… - safety — (no submodules)- validation — (no submodules)- validator — Stateful validator for a fixed `BitPack…
- find-array-length-errors — Per-array length-rule detector used by the recursive
validateDatawalker. Given aBitPackerSchemaarray shape (`[sc… - find-extra-fields — Extra-field detector for the object-schema branch of the recursive
validateDatawalker. Given aBitPackerSchemaobj… - validate-data — The recursive workhorse that drives every validator entry point in
@suaveplan/bitpacker-validation. `validateData(sch… - validation — (no submodules)- validator — Stateful validator for a fixed `BitPack…
- validator — Stateful validator for a fixed
BitPackerSchema.BitPackerValidator<T>is the right choice when a high-throughput pi…
- safety-checks.schema — Zod schemas for the configuration types of
- index — Path:
bitpacker-validation/src/index.tsExport: See source for details. - register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-validationpackage. Exposes `re… - types — Public type companions for
@suaveplan/bitpacker-validation: the validator options bundles, the error class, the error… - types.schema — Zod schemas for the two configuration shapes accepted by
@suaveplan/bitpacker-validation's public surface: `BitPacker… - utils — Type guards and shape-checks shared across the
@suaveplan/bitpacker-validationvalidators. These are the cheap, commo… - instruments — (no submodules)- safety — (no submodules) - safety-checks — Production-time defensive checks against pathological inputs to the bitpacker — schemas with infinite recursion, arrays…
- safety-checks.schema — Zod schemas for the configuration types of
@suaveplan/bitpacker-validation's safety subsystem:SafetyLimits(the ab… - safety — (no submodules)- validation — (no submodules) - find-array-length-errors — Per-array length-rule detector used by the recursive
validateDatawalker. Given aBitPackerSchemaarray shape (`[sc… - find-extra-fields — Extra-field detector for the object-schema branch of the recursive
validateDatawalker. Given aBitPackerSchemaobj… - validate-data — The recursive workhorse that drives every validator entry point in
@suaveplan/bitpacker-validation. `validateData(sch… - validation — (no submodules) - validator — Stateful validator for a fixed
BitPackerSchema.BitPackerValidator<T>is the right choice when a high-throughput pi…
- safety-checks.schema — Zod schemas for the configuration types of
- index — Path:
bitpacker-validation/src/index.tsExport: See source for details. - register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-validationpackage. Exposes `re… - types — Public type companions for
@suaveplan/bitpacker-validation: the validator options bundles, the error class, the error… - types.schema — Zod schemas for the two configuration shapes accepted by
@suaveplan/bitpacker-validation's public surface: `BitPacker… - utils — Type guards and shape-checks shared across the
@suaveplan/bitpacker-validationvalidators. These are the cheap, commo…
Install
bun add @suaveplan/bitpacker-validation
Usage
import { SafetyLimits, ValidationReport } from "@suaveplan/bitpacker-validation";
const limits = new SafetyLimits({ maxBits: 64, maxStringLength: 1024 });
const report = new ValidationReport();
report.addWarning("schema", "Large array may exceed budget");
report.addError("schema", "Unsupported type");
Modules
src/index.ts—SafetyLimits,ValidationReport