Documentation
Changelog
Release history and notable changes for nanvc.
Unreleased
Added
- Added a database secrets engine example that configures Vault dynamic PostgreSQL credentials against the local Docker Compose database service.
- Added generated SQL setup documentation for the database secrets example from
test/util/db/init.sh.
Changed
- Refactored runnable examples around shared workflow decorators and persona helpers for consistent operator, admin, and app flows.
- Updated generated example documentation to support an optional third tab for additional example resources.
Fixed
2.1.0 - 2026-05-03
Added
- Added v2 cubbyhole secrets engine support under
vault.secret.cubbyholefor CRUD workflows. - Added v2 system policy clients under
vault.sys.policiesfor ACL, EGP, password, RGP, and rotation policies, including exported response and request types. - Added v2 response wrapping helpers under
vault.sys.wrappingfor lookup, wrap, unwrap, and rewrap workflows. - Added v2 API documentation for system policies and response wrapping.
- Added a request wrapping example that demonstrates AppRole credential delivery through a short-lived wrapping token.
- Added a versioned KV v2 example that demonstrates write, patch, metadata, history, soft-delete, undelete, destroy, automatic deletion, and CAS workflows.
- Added generated documentation pages for runnable examples, including guide/source tabs for each example.
- Added shared example personas for operator, admin, and app workflows across the AppRole examples.
- Added v2 database secrets engine support under
vault.secret.dbfor connections, dynamic roles, generated credentials, static roles, and credential rotation workflows. - Added OpenAPI target and local schema patches for Vault database secrets endpoints, including pass-through plugin option typing.
- Added v2 API documentation for database secrets helpers.
- Added v2 integration coverage for ACL policy and response wrapping workflows.
- Added focused v2 unit coverage for system policy and system wrapping clients.
- Added focused unit and integration coverage for the v2 database secrets client.
- Added lightweight Mocha decorators and reorganized v2 tests under client, core, and transport-focused folders.
- Added a database-secrets example that demonstrates the full dynamic-credentials workflow using the typed
vault.secret.dbAPI (configureConnection, writeRole, generateCredentials) against a local PostgreSQL instance.
Changed
- Refactored the AppRole examples to use the shared persona helpers and verify the expected secret access behavior.
- Updated examples to share
examples/.envruntime material across workflows and print consistent success banners. - Updated OpenAPI response generation so local response patches take precedence over upstream schemas.
- Updated generated OpenAPI typing to preserve
additionalProperties: trueas string-keyedunknownrecords. - Updated CI and
test:allto run example workflows alongside tests and coverage. - Reduced the Docker-backed integration wait delay from a hardcoded 30 seconds to a wait loop that polls Vault’s health endpoint until it’s ready.
Fixed
- Updated the response wrapping unwrap helper to send the wrapping token as the request token header.
- Fixed broken links in docs.
- Fixed logs with incorrect levels.
2.0.1 - 2026-04-24
Added
- Added optional request lifecycle logging configured with
NANVC_LOG_LEVEL. - Added
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdto document contribution expectations and community standards. - Added README links to the changelog and maintained AppRole examples.
- Added a docs favicon and npm icon link in the documentation footer.
- Added a generated documentation changelog page sourced from the root
CHANGELOG.md. - Added focused v2 unit coverage for
Resulthelpers, Node transport request shaping, auth edge cases, system helpers, and KV v1/v2 error handling.
Changed
- Trimmed development and project layout details from the README in favor of the dedicated contributing guide.
- Updated the package homepage to the GitHub Pages documentation site.
- Updated the GitHub Pages workflow to generate the docs changelog before building.
- Changed v2 AppRole login, KV v1 helpers, and high-level KV shortcut validation to return
VaultClientErrorresults instead of throwing synchronous exceptions.
2.0.0 - 2026-04-20
Added
- Added the v2 client surface built around
VaultClientV2,RawVaultClient, structuredVaultClientError, and Rust-inspired promise-likeResult<T>helpers. - Added typed v2 support for common Vault workflows, including:
- system health, readiness, mount, init, and unseal helpers
- auth method and AppRole helpers
- KV v1 helpers
- common KV v2 helpers for read, write, list, and soft-delete
- Added Vault CLI-style KV shortcuts on
VaultClientV2:read,write,delete, andlist, defaulting to KV v1 with explicit{ engineVersion: 2 }support for KV v2. - Added
RawVaultClienttyped overloads generated from selected Vault OpenAPI paths, plus the OpenAPI target and generation scripts. - Added dedicated v2 unit and integration test coverage.
- Added GitHub Pages documentation under
docs/, including Getting Started, API v1/v2 references, error handling, and contributing guidance. - Added AppRole examples for both client generations:
examples/app-roleforVaultClientV2examples/app-role-v1for the originalVaultClient
- Added README files for each AppRole example with local Docker Compose setup and run instructions.
- Added a GitHub Pages workflow for publishing the documentation site.
Changed
- Updated package metadata and README positioning around a focused TypeScript Vault client, with
VaultClientV2documented as the forward-looking client. - Renamed v2 constructor options to align with the original client:
clusterAddressandauthToken. - Refocused documentation examples on application workflows with an existing token instead of promoting Vault initialization and unseal flows as first-contact examples.
- Moved operator-oriented v2 system methods such as init and unseal into a separate generated docs category.
- Documented that
secret.kv.v2intentionally covers the common KV v2 workflow and is not a complete implementation of every KV v2 OpenAPI operation. - Expanded documentation footer, navigation, and project links for users arriving from GitHub or npm.
- Updated
.npmignorefor the current docs, examples, OpenAPI, and tooling layout. - Updated CI and publish workflows so integration and coverage scripts own their own Docker setup/reset lifecycle.
- Updated coverage collection so unit, legacy integration, and v2 integration suites run as separate nyc-wrapped commands while preserving raw coverage data until the final report.
- Updated integration coverage to reset Docker-backed Vault state between the legacy and v2 integration suites.
Removed
- Removed the old
src/example.tsexample in favor of maintained examples underexamples/.
1.2.0 - 2026-04-12
Added
- Added a dedicated command barrel in src/lib/commands/index.ts so
VaultClientcan consume a single export surface. - Added modern project configs for build and test workflows:
- Added package
exportsandfilesmetadata in package.json. - Added optional HTTPS TLS client configuration to src/lib/client.ts, including support for custom CA-only setups and full mTLS with
ca,cert,key,passphrase, andrejectUnauthorized. - Added exported
VaultClientOptionsandVaultClientTlsOptionstypes from src/main.ts. - Added TLS integration fixtures and tests covering custom-CA HTTPS and required-client-cert mTLS Vault listeners.
Changed
- Refactored the internal command definition layer from
metadatatocommands. - Renamed command definition types:
VaultCommandMetadata->VaultCommandSpecVaultCommandValidationSchema->VaultCommandSchema
- Renamed command definition values to
*Specnaming, for example:VaultReadSecretCommandMetadata->readSecretSpecVaultUnsealCommandMetadata->unsealSpec
- Modernized src/lib/client.ts:
- replaced constructor-time prototype mutation with explicit typed instance methods
- tightened request and error handling types
- normalized URL joining and placeholder resolution
- restored explicit
addPolicyandremovePolicyclient methods - added an object-based constructor path for optional TLS transport configuration while keeping the legacy positional constructor working
- switched request transport handling to Node HTTP/HTTPS so custom TLS settings can be applied only when needed
- Modernized shared response and command typing in src/lib/commands/spec.ts.
- Updated TypeScript configuration to modern Node settings:
moduleandmoduleResolutionnow useNode16- stricter compiler settings are enabled for library code
- test code uses a more permissive config where needed
- Updated the toolchain in package.json:
- Node engine raised to
>=20 - TypeScript upgraded to
^6.0.0 - ESLint moved to flat config
- Mocha/test scripts updated for the compiled test flow
- Node engine raised to
- Refreshed README.md to match the current API, tooling, and project structure.
- Extended README.md with HTTPS custom CA and optional mTLS examples for
VaultClient. - Extended README.md with the TLS integration test setup and fixture endpoints.
- Updated docker-compose.yml by removing the obsolete top-level Compose version declaration.
- Synced .npmignore with the current project layout and tooling files.
Fixed
- Fixed unit tests so
npm testandnpm run test:unitpass again under the modernized TypeScript and Node setup. - Fixed IDE TypeScript project warnings for test files by adding test/tsconfig.json and setting an explicit
rootDir. - Fixed test compilation issues caused by stricter
unknownresponse typing in integration tests. - Fixed deprecated TypeScript config usage by replacing the old
node/node10resolver behavior withNode16. - Fixed package-publish ignore rules so current local tooling and repo-only files are excluded consistently with the new build layout.
- Fixed the changelog config references to match the actual test TypeScript setup in the repo.
Removed
- Removed the legacy
.eslintrc.jsconfiguration in favor of flat config. - Removed the old
src/lib/metadatatree after migrating its contents tosrc/lib/commands. - Removed the old intermediate command registry file src/lib/constants.ts in favor of the commands barrel.
Notes
- Integration tests now compile and start correctly, but still require local Docker-backed Vault/Postgres services to pass end to end.
- If you cut a release from this work, the next step would be to replace
Unreleasedwith the actual version number and release date.