Catalog npm
Back to packageRELEASE DETAILS

0.10.1

npm

@0disoft/mensor-compiler

Deterministic source contract checker for Mensor projects.

contractshtmlmensorstatic-analysistypescript
Published11 Sept 2026
Direct dependencies4
Transitive dependenciesNot calculated

README

Current package documentation

@0disoft/mensor-compiler

Deterministic source contract checker for Mensor projects.

Install

pnpm add @0disoft/mensor-compiler

Node.js 22 or newer is required.

Check A Project

import { checkProject } from "@0disoft/mensor-compiler";

const result = await checkProject({ root: process.cwd() });

if (!result.ok) {
  process.exitCode = 1;
}

process.stdout.write(`${JSON.stringify(result.report, null, 2)}\n`);

Compile A Runtime Manifest

import { compileProject } from "@0disoft/mensor-compiler";

const result = await compileProject({ root: process.cwd() });
if (result.ok) {
  process.stdout.write(`${JSON.stringify(result.manifest, null, 2)}\n`);
}

The compiler emits a manifest only after every configured diagnostic passes. The artifact contains static GET page HTML, POST routes, handler ids, and form decode contracts; it contains no source path, AST node, or executable handler.

Template producers may reuse the pure extractStaticHtmlFormDocument(file, html) export to obtain the same serializable HTML facts as the built-in provider. The helper does not read files or execute source; producers still own source binding, digests, embedded-fragment range offsets, and FormIndex serialization.

The default result contains DiagnosticReport v1. Select Check Output v2 explicitly when inspection coverage is required:

const result = await checkProject({
  root: process.cwd(),
  reportVersion: 2,
});

Contract failures are returned as data. Unexpected I/O or compiler failures remain exceptions. The compiler reads supported project files but does not execute project source or configuration, spawn framework tools, install dependencies, or access the network.

Documentation

Mensor is licensed under Apache-2.0.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 4

Native requirements
4 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
parse5
Environment
{
  "local_name": "parse5",
  "alias": false,
  "peer_metadata": null
}
8.0.1runtime
jsonc-parser
Environment
{
  "local_name": "jsonc-parser",
  "alias": false,
  "peer_metadata": null
}
3.3.1runtime
@typescript/typescript6
Environment
{
  "local_name": "@typescript/typescript6",
  "alias": false,
  "peer_metadata": null
}
6.0.2runtime
@0disoft/mensor-contract
Environment
{
  "local_name": "@0disoft/mensor-contract",
  "alias": false,
  "peer_metadata": null
}
0.10.1runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "c4384e78c8341499362b0e6a3288fb34f19fc4c5",
  "tarball": "https://registry.npmjs.org/@0disoft/mensor-compiler/-/mensor-compiler-0.10.1.tgz",
  "fileCount": 95,
  "integrity": "sha512-zYIGsAEhxwEyFwpJXQAwmo5Eh7GXgEwFeAzvxidyd26fTZZPnX+vM1+hXuGWirYfDPzwWdTEV2/6jlzx9rep5A==",
  "signatures": [
    {
      "sig": "MEYCIQCmN9R1WTAjBaWFwkj7kS0RmYkEDD+x8UEYNlQfWtwhWQIhAM527msS2Kzo9Bj2NXEUQsnIO2xm+dxYIa00XTb6Eu7G",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    },
    {
      "sig": "MEUCIQDv4LHctLOKX3O3/u9Haa/SsAgEJoJR/Nrtyk4N+EEiuwIgFXl4zJ2Kp6zp5cL2IGn7dqOrSRiHBhbUDrlWxqNOrF4=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "attestations": {
    "url": "https://registry.npmjs.org/-/npm/v1/attestations/@0disoft%2fmensor-compiler@0.10.1",
    "provenance": {
      "predicateType": "https://slsa.dev/provenance/v1"
    }
  },
  "unpackedSize": 387057
}

Repository

PENDING
0disoft/mensor

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:08 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:7d89396e30ee0d8f51d7dfc2da18a95252cca2f0eea895df876064ff38dddeae

Other collected versions

0.10.212 Sept0.10.010 Sept0.9.01 Sept0.2.19 Aug0.2.022 Jul0.1.020 JulView all collected versions →