refactor: remove _serialized field and implement efficient vars selection

- Remove _serialized field from vars interface to prevent serialization
  errors with throwing passBackend field
- Implement direct selection of generator fields using multi-select syntax
- Refactor vars_generators() to use new Generator.from_flake() method that
  selects only safe fields (avoiding non-serializable values)
- Remove unused legacy methods: Generator.from_json(), Var.from_json(),
  Prompt.from_json()
- Update precaching to match new selection approach

This fixes the serialization errors that were preventing vars from working
with the new password-store implementation by avoiding the problematic
_serialized field entirely.
This commit is contained in:
lassulus
2025-07-02 10:19:54 +02:00
parent 8f9d88a104
commit a6409f921b
7 changed files with 66 additions and 89 deletions

View File

@@ -107,7 +107,7 @@ def test_generate_secret(
)
assert store2.exists("", "age.key")
(
assert (
test_flake_with_core.path
/ "vars"
/ "per-machine"