feat(update): add --exclude flag and resilient file reads#461
Open
JonathanWorks wants to merge 2 commits intotobi:mainfrom
Open
feat(update): add --exclude flag and resilient file reads#461JonathanWorks wants to merge 2 commits intotobi:mainfrom
JonathanWorks wants to merge 2 commits intotobi:mainfrom
Conversation
The -c/--collection flag now works with 'qmd update' to filter which collections to update. This is useful when you have many collections and only want to re-index specific ones. Usage: qmd update -c notes # Update only 'notes' collection qmd update -c notes -c docs # Update 'notes' and 'docs' collections qmd update # Update all collections (existing behavior) Fixes tobi#298
- Add --exclude flag for qmd update (inverse of -c) - Validate -c and --exclude are mutually exclusive - Wrap readFileSync in try/catch with warning logs for ETIMEDOUT/ENOENT/EAGAIN - Track and report skipped files at end of collection update - Merged upstream PR tobi#335 for -c flag
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
Two small improvements to
qmd update:1.
--excludeflag (fixes #459)Inverse of
-c— update all collections except named ones:Mutually exclusive with
-c(errors if both provided).2. Resilient file reads (fixes #460)
Wraps
readFileSyncin try/catch during indexing. On ETIMEDOUT/ENOENT/EAGAIN:Applies to both
reindexCollection()(update path) andindexFiles()(collection add path).Changes
src/cli/qmd.ts— CLI option parsing,updateCollections,indexFiles, help textsrc/store.ts—ReindexResulttype,reindexCollectionerror handlingTest plan
qmd update --exclude <collection>updates all except namedqmd update -c foo --exclude barerrors with mutual exclusivity messageqmd updatewith no flags still updates all (backward compatible)