feat(plugin): JWT Faker for generating test JWTs - #540
Conversation
|
Hi @Exudev , thanks for the contribution! For plugins, we don't merge them directly into this repo — each plugin needs to live in its own public repository as a standalone community plugin. Could you:
Once we have the link, we'll review it on our end. If no core changes are needed, we'll go ahead and list/publish it as a community plugin. Thanks again for putting this together — looking forward to taking a look once the repo is up! |
|
Hi @phurpa-tsering, Thanks for the clarification! As requested, I have moved the JWT Faker plugin into its own standalone public repository following Voiden community plugin conventions: 📦 Repository: https://github.com/Exudev/voiden-plugin-jwt-faker The repository includes the standalone build pipeline, unit & e2e tests, manifest, changelog, and automated release workflow. Feel free to review and list/publish it in the plugin registry. Since plugins live in standalone repositories, this PR can be closed. Thanks! |
|
Hi @Exudev — took a look at the standalone repo, the core JWT/HMAC logic checks out and the tests pass. One structural thing worth fixing before we list it: The project was hand-built (build.mjs, shim list, release.yml, etc. look manually adapted from an existing plugin) rather than scaffolded from our official tooling. Could you regenerate the project using @voiden/create-plugin instead?
and port your src/ logic (jwtUtils.ts, JwtFakerModal.tsx, etc.) into the generated scaffold. That gives you the maintained build/zip/release scripts (npm run build, npm run zip, npm run release) and the correct .github/workflows/release.yml, so the release assets stay in sync with what the installer/registry expects — e.g. the scaffold's workflow renames the bundle to dist/main.js before publishing, which your current manual workflow doesn't do. Also worth fixing while you're in there: context.registerStatusBarItem(...) in src/main.ts is missing the required position: 'left' | 'right' field, so the status bar button never actually renders — right now there's no way to open the plugin from the UI. |
|
Hi @phurpa-tsering, Thanks for the feedback! I've updated the project using the official
🚀 Updated Release v1.0.1: https://github.com/Exudev/voiden-plugin-jwt-faker/releases/tag/v1.0.1 Thanks again for the review! |
|
Thanks for building this out — solid feature overall. Two UI requests before merge: 1. Dialog → tab
2. Theme-color compliance Several classes here are hardcoded Tailwind defaults rather than Voiden's theme tokens, so they won't track the active theme (light/dark/custom):
Could you swap these over so the JWT editor matches the rest of the app across themes? Happy to point to more concrete examples in the codebase if useful. |
Description
Closes #515
Add a JWT Faker plugin (
plugins/jwt-faker) that enables developers to generate, customize, sign, decode, and copy JSON Web Tokens (JWTs) directly within Voiden for API authentication testing.Features & Implementation
HS256(HMAC SHA-256)HS384(HMAC SHA-384)HS512(HMAC SHA-512)none(Unsigned tokens)+1h exp,+1d exp, setiat, setnbfjwt-fakerin plugin registry and synced to Electron host.Testing
plugins/jwt-faker/src/__tests__/jwtUtils.test.ts): 8/8 passed.