fix: normalize bridge errors and support nested group paths
Distinguish invalid KeePass requests from backend failures in the Python bridge, improve nested group path resolution, and add coverage for nested group creation plus payload forwarding.
This commit is contained in:
@@ -85,6 +85,8 @@ Creates a new entry in the target database and persists it immediately.
|
||||
- `notes`: optional notes
|
||||
- `groupPath`: optional target group path
|
||||
|
||||
`groupPath` is resolved as an existing group path when possible. Nested paths such as `Folder1/SubFolder` are supported when the target group exists.
|
||||
|
||||
### `createGroup(group)`
|
||||
Creates a new group and persists it immediately.
|
||||
|
||||
@@ -92,6 +94,8 @@ Creates a new group and persists it immediately.
|
||||
- `name`: group name
|
||||
- `path`: optional parent group path
|
||||
|
||||
`path` is resolved as an existing parent group path when possible, including nested paths.
|
||||
|
||||
### `save()`
|
||||
Persists the current database state.
|
||||
|
||||
@@ -102,7 +106,7 @@ No-op for now.
|
||||
|
||||
- The bridge currently launches a Python process per call.
|
||||
- This is simple and robust for a first version.
|
||||
- Errors from the Python bridge are propagated to the TypeScript API, including invalid or empty output.
|
||||
- Errors from the Python bridge are propagated to the TypeScript API, including invalid or empty output. Bridge failures are normalized to distinguish invalid requests and backend errors.
|
||||
- A persistent Python process can be added later if needed.
|
||||
- Write operations currently open, modify, and save the database per command.
|
||||
- Bundled fixtures include `tests/fixtures/data.kdbx` and `tests/fixtures/empty.kdbx`; the companion JSON file stores the password and expected content for tests/examples.
|
||||
|
||||
Reference in New Issue
Block a user