v3.2.0
Added
- Windows shim support (
bw.cmd/bw.bat/bw.ps1) -- Installer methods put
different shims onPATHandCreateProcesscan only run real.exe/.com
images.resolve_bw_commandnow resolves all flavours, most-reliable first:
nativebw.exe/bw.comrun directly;bw.cmd/bw.batare routed through
cmd.exe /c(invoked by basename from their own directory to avoid
shell-quoting issues); and abw.ps1(which isn't inPATHEXT, so
shutil.whichcan't see it) is found onPATHand run through PowerShell. So
when npm ships bothbw.cmdandbw.ps1, thecmdshim is preferred.
terminate_servetears thebw serveprocess tree down withtaskkill /F /T
so the real server isn't orphaned behind acmd.exe/PowerShell wrapper. A
windows-bw-cmdCI job installsbwvia npm and runs a live smoke test
(tests/windows_bw_cmd_smoke.py) covering shim invocation (bw --version) and
cmd.exe-wrapped process-tree teardown. Fixes #8.
Fixed
- Missing
bwCLI traceback -- When the Bitwarden CLI (bw) was not on
PATH,kp2bwcrashed with a long, intimidatingFileNotFoundError
traceback fromsubprocess. The CLI now checks forbwup front (before
prompting for passwords) and exits cleanly with an actionable message; any
BitwardenClientError/ConversionErrorraised during conversion is reported
the same way instead of as a stack trace.BitwardenServeClientraises a
BitwardenClientErrorrather than lettingFileNotFoundErrorescape.
Detection usesshutil.which, so Windowsbw.exe/bw.cmdshims are found via
PATHEXT; thebwsubprocess calls also catchFileNotFoundError, so a
genuinely missing CLI still yields the friendly message. Fixes #5. - Chained
{REF:...}references -- a reference whose target was itself
another reference entry (a chainA -> B -> C) raisedKeyErrorin
_resolve_entries_with_references, logged aCould not resolve entry
warning, and dropped the referencing entry from the import even though
KeePass resolves such chains correctly. Unresolved targets that are
themselves REF entries are now resolved transitively and on demand, with
memoization and cycle detection, so the chain collapses onto whatever it
ultimately maps to. Fixes #6. - Malformed
{REF:...}tokens no longer abort the run -- a reference whose
field/lookup part lacked the@separator (e.g.{REF:UI:...}) raised an
uncaughtValueErrorin_parse_kp_ref_stringthat stopped the whole
migration. Such tokens are now reported and the offending entry is skipped,
consistent with other unresolvable references.
What's Changed
- fix: resolve chained REF references by @kjanat in #14 — thanks @szotsaki for reporting #6 🙏
- fix: friendly error when bw CLI is missing, and support Windows npm bw.cmd shims by @kjanat in #16 — thanks @szotsaki (#5) and @Joly0 (#8) 🙏
Full Changelog: v3.1.0...v3.2.0