@polywrap/package-validation
TypeScript icon, indicating that this package has built-in type declarations

0.12.2 • Public • Published

@polywrap/package-validation

Description

Utilities for the validation of WRAP packages. Allows to implement custom constraints to check if a WRAP package is valid

The main two entities here are WasmPackageValidator and FileSystemPackageReader

Usage

import { WasmPackageValidator, FileSystemPackageReader } from "@polywrap/package-validation"

// Size unit is KB
const validator = new WasmPackageValidator({
    maxSize: 1_000_000,
    maxFileSize: 1_000_000,
    maxModuleSize: 1_000_000,
    maxNumberOfFiles: 10,
});

const reader = new FileSystemPackageReader("absolute/path/to/package/folder")
const result = await validator.validate(result)

Dependencies (2)

Dev Dependencies (8)

Package Sidebar

Install

npm i @polywrap/package-validation

Weekly Downloads

24

Version

0.12.2

License

MIT

Unpacked Size

33.2 kB

Total Files

35

Last publish

Collaborators

  • polywrap-build-bot
  • dorgjelli