Open
Conversation
Contributor
|
my understanding is that this is a custom file schema adjusted for this use case. While I'm not against it, how is a user expected to discover what the expected schema is? |
Author
You are very correct. I added a description of the preference item, and a section explaining it to the readme. |
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.
Add feature satisfying issue 213. This is my first real attempt at something like this, so please toss me feedback!
Default behavior should be preserved if the new
fileSchemaconfig item is left blank or is null or undefined, otherwise the new behavior takes over. The JSON schema for this new string is as follows:{ "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": [ "password", "otp", "field", "note" ] } } } }My personal configuration that I both used for testing and am going to be using in the future is as follows:
[ {"key": "Password","type": "password"}, {"key": "UserName","type": "field"}, {"key": "URL","type": "field"}, {"key": "OTP","type": "otp"} ]This setup only takes into account lines without keys in them, so
key: valuewill simply be treated as a value itself. This can be extended later.Also ran
npm audit fixas there were some vulns that were easy to fix.