feat: First step at the rewrite #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could only review parts of it, but found what I could.
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
…ethods Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Invalid entries should be removed, they should never stay as it corrupts the data.
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, have these, I gotta go for a minute or so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 quick remarks, will look in more detail in mo. in the train rn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one thing, other than that it looks good.
Co-Authored-By: Gryffon Bellish <owenbellish@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did ask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did ask
Tasks
Changelog
Added
null
as an option to reset a key inSettingsFolder
#{update
}.Serializer
#{validate
,resolve
} to allow further control on how SettingsGateway handles the data.context
to thesettingsUpdate
andsettingsCreate
events, they contain the raw changes, guild, language, etc.extraContext
to theSettingsFolderResetOptions
type, this value is pased in all places (Serializer
#validate
,SchemaEntry
#filter
,settingsUpdate
andsettingsCreate
events, and more).Changed
Serializer
#deserialize
's arguments to (SerializableValue
,SerializerUpdateContext
).SchemaEntry
#{min
,max
} toSchemaEntry
#{minimum
,maximum
}.SettingsFolder
's value type to be more accurate.SettingsFolderUpdateOptions
's option to produce a TypeScript compiler error whenarrayAction
is set to'overwrite'
andarrayIndex
is defined.SettingsFolder
#client
to throw an error when it's uninitialized.SettingsFolder
#{reset
,update
} to return a much more useful struct.arrayIndex
inSettingsFolder
#update
andarrayAction
is defined asadd
, all entries will be inserted at given index.arrayIndex
inSettingsFolder
#update
andarrayAction
is defined asremove
, as many entries as given will be removed from given index.arrayIndex
inSettingsFolder
#update
andarrayAction
is not defined or defined asauto
, all entries will replace the existing ones.Removed
throwOnError
option inSettingsFolder
#{reset
,update
}, they will now always throw when they encounter an error.Fixed
Schema
#get
would throw an error if a path did not exist.Schema
#{add
,remove
} was still callable even after being initialized.SettingsFolder
#get
would throw an error if a path did not exist.SettingsFolder
#pluck
.SettingsFolder
#resolve
not resolving into objects when specifying a folder path.SettingsFolder
#reset
where database conditions were not handled correctly.SettingsFolder
#update
where options would sometimes type error.SettingsFolder
's patch function not allowing non-literal objects to be used.SettingsFolder
#{reset
,update
} patching after emit.Provider
andSQLProvider
classes.