feat: add write support for KeePass entries and groups
This commit is contained in:
+6
-5
@@ -1,7 +1,7 @@
|
||||
# Project
|
||||
|
||||
## Goal
|
||||
Provide a small read-only TypeScript wrapper around KeePass `.kdbx` databases using a Python bridge powered by `pykeepass`.
|
||||
Provide a TypeScript wrapper around KeePass `.kdbx` databases using a Python bridge powered by `pykeepass`.
|
||||
|
||||
## Architecture
|
||||
- Public API is TypeScript.
|
||||
@@ -15,8 +15,10 @@ Provide a small read-only TypeScript wrapper around KeePass `.kdbx` databases us
|
||||
- `KeePassDatabase.listEntries()`
|
||||
- `KeePassDatabase.findEntries(query)`
|
||||
- `KeePassDatabase.listGroups()`
|
||||
- `KeePassDatabase.createEntry(entry)`
|
||||
- `KeePassDatabase.createGroup(group)`
|
||||
- `KeePassDatabase.save()`
|
||||
- `KeePassDatabase.close()` is a no-op.
|
||||
|
||||
## Types
|
||||
- Entries expose: `title`, `username`, `password`, `url`, `notes`, optional `groupPath`, optional `otp`.
|
||||
- Groups expose: `name`, `path`.
|
||||
@@ -33,7 +35,7 @@ Provide a small read-only TypeScript wrapper around KeePass `.kdbx` databases us
|
||||
- Bundled fixtures: `tests/fixtures/data.kdbx` and `tests/fixtures/empty.kdbx`.
|
||||
- Companion JSON fixture: `tests/fixtures/data.kdbx.json` stores the password and expected content.
|
||||
- Unit tests in `tests/unit/` mock the child process and validate bridge parsing/error handling.
|
||||
- Integration tests in `tests/integration/` use `data.kdbx` to verify entries, groups, partial search, and OTP/TOTP output when `pykeepass` is installed.
|
||||
- Integration tests in `tests/integration/` use `data.kdbx` to verify entries, groups, partial search, OTP/TOTP output, and basic write persistence on a temporary copy when `pykeepass` is installed.
|
||||
- The integration test runner checks for `pykeepass` and skips cleanly when it is unavailable.
|
||||
|
||||
## Main scripts
|
||||
@@ -43,5 +45,4 @@ Provide a small read-only TypeScript wrapper around KeePass `.kdbx` databases us
|
||||
- `bun run setup:python`
|
||||
|
||||
## Current direction
|
||||
Keep improving failure-path coverage and keep the API minimal unless a concrete need appears.
|
||||
|
||||
Keep improving failure-path coverage, keep write support minimal and predictable, and continue validating persistence on temporary copies.
|
||||
|
||||
Reference in New Issue
Block a user