DerEditorJS is a browser-based ASN.1 DER/BER/PEM viewer and editor with a reusable CommonJS Core API. Parsing and editing are performed locally in the browser; the Node.js server only serves static files.
This repository starts from the Git history of pkistudio/pkistudiojs, but is maintained as an independent repository rather than a GitHub fork. The original project is retained as the upstream Git remote.
Current version: 0.1.0
The initial import preserves the existing file names and browser globals (window.PkiStudio and window.PkiStudioCore) for compatibility. Product naming, APIs, and release policy can be migrated incrementally.
Automatic npm publication, external release posting, managed-rule synchronization, and Pages deployment inherited from the source repository are disabled during bootstrap. Only CI remains active by default.
- Browser-local DER, BER, PEM, headerless base64, and HEX parsing.
- Navigable ASN.1 tree with tag metadata, decoded values, OID names, and hexadecimal previews.
- Editing and DER re-encoding for supported primitive values.
- Node-level copy, export, delete, insert, add, and new-window actions.
- Reusable Core, viewer, and OID resolver APIs.
The inherited viewer API remains available while the DerEditorJS API is designed. Initialize a read-only viewer with editable: false:
const studio = viewer.init({ editable: false });The returned viewer instance can change modes later with setEditable(false) or setEditable(true).
The DER inspector can edit an existing node's identifier class and tag index. Before applying an identifier change, it validates the current content against the selected universal tag.
The browser globals remain window.PkiStudio and window.PkiStudioCore during this compatibility phase.
The recommended Windows 11 setup is WSL 2 + Docker Desktop + VS Code Dev Containers. The repository lives in the WSL Linux filesystem at:
/home/west/code/pkistudio/dereditorjs
Open it from Ubuntu 24.04:
cd /home/west/code/pkistudio/dereditorjs
code .In VS Code, run Dev Containers: Reopen in Container. The container uses Node.js 24 and keeps node_modules and the npm cache in project-specific Docker volumes.
Inside the container:
npm test
npm run check
node app/server.jsOpen http://localhost:8080/. See docs/development-environment.md for isolation, verification, backup, and cleanup procedures.
The planned npm package name is @pkistudio/dereditorjs. Publication is intentionally disabled until the package contract and release process are reviewed.
Package exports:
@pkistudio/dereditorjs: Core API.@pkistudio/dereditorjs/core: Core API alias.@pkistudio/dereditorjs/viewer: browser viewer API.@pkistudio/dereditorjs/oid-resolver: bundled OID resolver API.
Inspect upstream changes before merging them:
git fetch upstream
git log --oneline main..upstream/main
git diff main...upstream/mainBecause this is an independent product, upstream changes should be integrated through a dedicated branch and reviewed rather than merged automatically.
DerEditorJS is distributed under the MIT License. It is derived from PkiStudioJS; the original copyright and permission notice are preserved in LICENSE.