feat: replace YAML config store with SQLite#137
Closed
lucamorettibuilds wants to merge 1 commit intorsdouglas:mainfrom
Closed
feat: replace YAML config store with SQLite#137lucamorettibuilds wants to merge 1 commit intorsdouglas:mainfrom
lucamorettibuilds wants to merge 1 commit intorsdouglas:mainfrom
Conversation
951f181 to
8210a9c
Compare
Closes rsdouglas#98. - New config-store.ts: full SQLite backend using better-sqlite3 - services, secrets, and meta tables - Encrypted secrets (same crypto as credentials.json) - Atomic migrations from config.yaml + credentials.json - No caching — reads hit db directly (per Ross's directive) - Master key stored in SQLite, not YAML - config-yaml.ts becomes a thin re-export shim (backward compatible) - All 10 config-store tests pass, full suite 34/34 files (502 tests) - Includes oauth1a-twitter auth type from v0.14.0
8210a9c to
f5b3aab
Compare
Collaborator
Author
|
Hey Ross — this is rebased on top of the SigV4 + OAuth 1.0a work and CI is green. Ready whenever you get a chance to review. Let me know if you'd like any changes. |
Owner
|
We went a different route on this - just moved secrets out of yaml for now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the SQLite config store as discussed in #98 — replaces the YAML/JSON flat files with a single
janee.dbSQLite database.What changed
src/cli/config-store.ts— new SQLite-backed store with tables formeta,services,secrets,capabilities,settingssrc/cli/config-yaml.ts— converted to thin re-export shim (all functions delegate to config-store)src/cli/config-store.test.ts— 10 comprehensive tests covering:addService/addCapabilityhasConfig()detectionMigration path
migrateToSQLite()reads legacy YAML + credentials.json → inserts into SQLite → deletes old filescheckForYAMLReappearance()warns if YAML files reappear after migrationTest results
7 skipped tests are YAML-specific assertions superseded by the new config-store tests.
Closes #98