Skip to content

Development

dweller long gone edited this page May 26, 2026 · 2 revisions

Development

This page summarizes local development and package conventions for ASN.1 Definition Sifter.

Project Shape

Key files:

  • src/core.ts: public core API barrel.
  • src/core/: UI-independent TLV feature extraction, schema corpus handling, candidate matching, scoring, diagnostics, and annotated tree types.
  • src/adapters/: PkiStudioJS and ASN.1 Instance Builder adapters.
  • src/corpus/pki-components.ts: built-in PKI component corpus wrapper around the shared pkiComponentDefinition from @pkistudio/asn1instancebuilder.
  • src/profiles/: PKI profile and report helpers.
  • src/report/agent-report.ts: JSON-friendly candidate report generation.
  • src/app.ts: standalone browser viewer and embedded PkiStudioJS integration.
  • src/styles.css: standalone viewer styles.
  • test/: Vitest coverage for core behavior and adapters.
  • docs/asn1defsifter.md: product and design notes.

Local Checks

npm run check
npm test
npm run build
npm run smoke

For package or release-related changes:

npm run pack:dry-run

Local Development Server

npm run dev -- --port 5173 --strictPort

Then open:

http://localhost:5173/

In VS Code, the Start asn1defsifter server task starts the same server.

Wiki Preview in Codespaces

The repository devcontainer can prepare Gollum and clone the GitHub Wiki repository into:

/workspaces/asn1defsifter.wiki

Start the local Wiki preview with the VS Code task:

Start asn1defsifter wiki

Gollum listens on port 4567.

Wiki edits should stay separate from main repository changes unless explicitly requested. Review local Wiki diffs before pushing the Wiki repository.

Package Entry Points

The npm package is @pkistudio/asn1defsifter.

Exports:

  • @pkistudio/asn1defsifter: core API.
  • @pkistudio/asn1defsifter/core: core API alias.
  • @pkistudio/asn1defsifter/app: standalone viewer initializer.
  • @pkistudio/asn1defsifter/styles.css: standalone viewer styles.

Version Metadata

When bumping versions, keep version metadata synchronized across:

  • package.json
  • package-lock.json
  • README.md

Release Notes

Release work normally follows a PR path: branch, focused commit, push, PR, CI, merge, annotated tag, GitHub Release, npm publication, Pages verification, and announcement posts.

Verify published package state with:

npm view @pkistudio/asn1defsifter@<version> version dist-tags dist.tarball --json

The npm package should remain browser-first and host-neutral. Do not introduce Node-only runtime dependencies into browser-shipped code.

For the built-in PKI baseline, prefer the shared pkiComponentDefinition from @pkistudio/asn1instancebuilder instead of duplicating ASN.1 definition text in this repository.

Clone this wiki locally