JanssenProject / JanssenProject/jans
fix(jans-cedarling): align JavaScript docs, Tarp, and examples with the updated WASM API
- Dominant language
- Java
- Stars
- 647
- Forks
- 173
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 110
Description
### Description
- Development target issue
Follow-up to [#14899](https://github.com/JanssenProject/jans/issues/14899) and [PR #14900](https://github.com/JanssenProject/jans/pull/14900).
- Implementation Details
1. Update external JavaScript documentation: align callable names, package initialization/build guidance, and the tutorial's copied API declarations with the published package's `.d.ts`. Preserve canonical bootstrap keys, request/response data fields, and other bindings' API names; update only WASM references in the UniFFI guides.
2. Migrate Tarp after the updated package is published. It currently pins `0.0.404`; update its dependency alongside `authorize_unsigned` → `authorizeUnsigned`, `authorize_multi_issuer` → `authorizeMultiIssuer`, `get_logs_by_request_id_and_tag` → `getLogsByRequestIdAndTag`, and `json_string` → `jsonString`. Existing explicit `initWasm()` usage can remain.
3. Provide maintained React/Vite, webpack, Node ESM, Node CommonJS, and edge integration examples. Reuse suitable existing tutorial projects. Each example must install the published package and demonstrate initialization and authorization.
-------------------
### Prepare
- [x] Read contribution guidelines
- [x] Read license information
------------------
### Identified code changes
- [x] Update Tarp's package dependency, lockfile, and affected call sites together after publication.
- [x] Add or adapt maintained React/Vite, webpack, Node ESM, Node CommonJS, and edge examples using the published package.
- [x] Fix the "[adm-zip: Crafted ZIP file triggers 4GB memory allocation](https://github.com/advisories/GHSA-xcpc-8h2w-3j85) by upgrading `admin-zip` from "0.6.0" to `0.6.1`
-------------------
### Test cases and code coverage
- [ ] Compile and execute applicable JavaScript/TypeScript documentation snippets against the published package; verify copied declarations against its `.d.ts`.
- [x] Validate Tarp configuration, unsigned and multi-issuer authorization, result display, logs, and extension production builds after its dependency upgrade.
- [x] Build and run each retained integration example, verifying initialization and authorization against the published package.
-------------------
### Document the changes
- [x] Update `docs/cedarling/tutorials/javascript.md`.
- [x] Update the JavaScript guidance in `docs/cedarling/tutorials/cedarling-getting-started.md`.
- [x] Update the WASM guidance in `docs/cedarling/reference/cedarling-policy-store.md`.
- [x] Update the JavaScript examples in `docs/cedarling/reference/cedarling-authz.md`.
- [x] Update the JavaScript examples in `docs/cedarling/reference/cedarling-multi-issuer.md`.
- [x] Update the JavaScript examples in `docs/cedarling/reference/cedarling-jwt-validation.md`.
- [x] Update the WASM helper references in `docs/cedarling/developer/mobile-apps/cedarling-uniffi.md`.
- [x] Update the WASM helper references in `jans-cedarling/bindings/cedarling_uniffi/README.md`.
- [x] Document the published package version used by Tarp and any changed integration instructions.
- [x] Provide dependency installation, setup, build/run, and authorization verification instructions for each maintained example.
Contributor guide
Assessment
This issue has not been assessed yet.