-
Notifications
You must be signed in to change notification settings - Fork 0
Development
This page summarizes local development and package conventions for Private Key Gadgets.
Key files:
-
src/core.ts: UI-independentPvkGadgetsCoreAPI for WebCrypto key generation, key recognition, SubjectDN, CSR, self-signed certificates, PEM, and DER helpers. -
src/pkcs12.ts: PKCS#12 import and export helpers built on PKIjs and asn1js. -
src/app.ts: browser application shell, key tree UI, embedded PkiStudioJS viewer integration, host callbacks, andinitPrivateKeyGadgetsexport. -
src/main.ts: default app entry forindex.html. -
src/viewer.ts: standalone PkiStudioJS viewer entry forviewer.html. -
src/pkistudio.ts: adapter for the@pkistudio/pkistudiojsdependency. -
src/styles.css: application and viewer-host styling. -
vite.config.ts: Vite build configuration, version injection, app entries, and package entry outputs.
Run these before handing normal code changes back:
npm run check
npm run buildFor package or release-related changes, also run:
npm run pack:dry-runnpm run dev -- --port 5173 --strictPortThen open:
http://localhost:5173/
In VS Code, the Start pvkgadgets server task starts the same server.
The repository devcontainer can prepare Gollum and clone the GitHub Wiki repository into:
/workspaces/pvkgadgets.wiki
Start the local Wiki preview with the VS Code task:
Start pvkgadgets wiki
Gollum listens on port 4567.
The npm package is @pkistudio/pvkgadgets.
Exports:
-
@pkistudio/pvkgadgets:dist/core.js. -
@pkistudio/pvkgadgets/core:dist/core.js. -
@pkistudio/pvkgadgets/pkcs12:dist/pkcs12.js. -
@pkistudio/pvkgadgets/app:dist/app.js. -
@pkistudio/pvkgadgets/styles.css:dist/styles.css.
When bumping versions, keep version metadata synchronized across:
package.jsonpackage-lock.jsonREADME.md
The package version is used for __PVKGADGETS_VERSION__, the app About display, and PvkGadgetsCore.version.
Release work normally follows a PR path: branch, focused commit, push, PR, CI, merge, annotated tag, GitHub Release, npm publication, and verification.
Verify published package state with:
npm view @pkistudio/pvkgadgets@<version> version dist-tags dist.tarball --jsonPKCS#12 parsing and writing should continue to use PKIjs and asn1js structured APIs. Browser-shipped code should not gain Node-only runtime dependencies.