Releases: mishka-group/mishka_developer_tools
0.1.8
Changelog for MishkaDeveloperTools 0.1.8
We recently separated the GuardedStruct macro into a standalone library. Please visit its repository for more information.
0.1.7
Changelog for MishkaDeveloperTools 0.1.7
Kindly ensure that the macro is updated as quickly as feasible. This version includes a bug patch in the macro kernel that eliminates the issue of not being able to build in projects.
In the past, it was possible to extend validation and sanitizer functions within the macro itself; however, this was a relatively insignificant addition that was ultimately overwritten. The same opportunity will now be available to you if you include environment in the project.
For example:
Application.put_env(:guarded_struct, :validate_derive, [TestValidate, TestValidate2])
Application.put_env(:guarded_struct, :sanitize_derive, [TestSanitize, TestSanitize2])
# OR
Application.put_env(:guarded_struct, :validate_derive, TestValidate)
Application.put_env(:guarded_struct, :sanitize_derive, TestSanitize)
I offer my heartfelt apologies for the occurrence of this bug and express my desire to encounter less similar challenges in the future.
Refs:
- elixir-lang/elixir@bd99dcc
- elixir-lang/elixir#13699
- https://elixirforum.com/t/the-dependency-build-is-outdated-error-with-getting-lib-from-github-branch/64599/2
Based on elixir-lang/elixir#13699
Full Changelog: 0.1.6...0.1.7
0.1.6
Changelog for MishkaDeveloperTools 0.1.6
We are delighted to introduce our new version of Mishka developer tools library. In this version, some parts have been optimized and improved for the new version of Refactor and Rewriting the Mishka installer project with Erlang's built-in databases - 0.1.0
Features:
- Add
Crypto
helper module - Add new optional dependencies and their wrappers [
nimble_totp
,joken
,jason
,plug
,bcrypt_elixir
,pbkdf2_elixir
,argon2_elixir
] - Add a normal and basic
validated_password?
function - Add basic elixir wrapper for erlang queue
- Add new validattion for erlang queue inside
guarded_struct
- Add some helpers functions for erlang queue
Improvement:
- Fix and Add compile time check is there geo url module or not
- Support Struct as the builder entry
- Improve some
dialyzer
warning - General improvements for the new version of Mishka Installer - Refactor and Rewriting the Mishka installer project with Erlang's built-in databases - 0.1.0
Extra:
- Update
ex_doc
dep - Update Github
CI
- Delete all ecto deps and custom macro and tests
Full Changelog: 0.1.5...0.1.6
0.1.5
Changelog for MishkaDeveloperTools 0.1.5
The decision was made that this version will be a long-term version, and it will also include features that are several versions behind the existing version. However, because of the pressing issues with the builder's loading speed and the solution to those issues, it was decided to release this version sooner with fewer features than it had originally planned.
Features:
- Add
condition_field
fields inside__information__
function -
Inside module derive, in nested struct we can call fromcaller
- Add
uuid
fromecto
- Add keys and enforce keys in
__information__
function - Add some helpers like:
timestamp
,validated_user?
and validationusername
Improvement:
- Speed problem in the derive section, and before this part of app V0.1.4, #30
- Fix performance issue inside sanitizer and validation, when we are using external
deps
- Fix
main_validator
and halt the error when we have errors insidevalidator
and not loadmain_validator
- Add some information and helper to be compatible for Mnesia (need more in the future)
- Fix bug and Add
NaiveDateTime
,DateTime
,Date
struct to map parser
Extra
- Mnesia wrapper for Elixir, #28
- Add Erlang guard convertor for Elixir (simple helper function)
- Add
Mnesia
pagination (infinite_scroll, numerical) - Add some helper to work with
Mnesia
data
Full Changelog: 0.1.4...0.1.5
0.1.4
We are delighted to introduce our new version of Mishka developer tools library. For more info click on GuardedStruct.
Changelog for MishkaDeveloperTools 0.1.4
Features:
-
Support whole entries check derives for struct or structs (external module) (More information: #26)
-
Support
derive
andvalidator
onconditional_field
macro as entries checker -
Support nested conditional fields(More information: https://github.com/mishka-group/mishka_developer_tools/issues/25)
guardedstruct do
conditional_field(:actor, any()) do
field(:actor, struct(), struct: Actor, derive: "validate(map, not_empty)")
conditional_field(:actor, any(),
structs: true,
derive: "validate(list, not_empty, not_flatten_empty_item)"
) do
field(:actor, struct(), struct: Actor, derive: "validate(map, not_empty)")
field(:actor, String.t(), derive: "sanitize(tag=strip_tags) validate(url, max_len=160)")
end
field(:actor, String.t(), derive: "sanitize(tag=strip_tags) validate(url, max_len=160)")
end
end
Fixed bugs:
- Fix showing different errors when they accompany a conditional errors
- Fix short anonymous function warning in elixir 1.16
- Support pre-check derives inside conditional fields
- Normalize conditional fields errors
- Normalize validator errors
- Normalize errors
hint
- Normalize
derives
errors - Fix
dialyzer
warning - Support derive in normal conditional field without validator
conditional_field(:id, String.t()) do
field(:id, String.t(), derive: "sanitize(tag=strip_tags) validate(url, max_len=160)")
field(:id, any(), derive: "sanitize(tag=strip_tags) validate(not_empty_string, uuid)")
end
Docs
- Add LiveBook
Full Changelog: 0.1.3...0.1.4
0.1.3
We are delighted to introduce our new version of Mishka developer tools library. For more info click on GuardedStruct.
Changelog for MishkaDeveloperTools 0.1.3
Features:
- Support List
conditional_field
"actor": [
"http://joe.example.org",
{
"type": "Person",
"id": "http://sally.example.org",
"name": "Sally"
},
:test
]
- Covering
hint
inside deriveconditional_field
and normalderive
- Support
domain
key inside children fields - Support new derives:
not_flatten_empty
,not_flatten_empty_item
as validation - Support
not_empty
andmax_len
,min_len
for list in validation derive.
Fixed bugs:
- Fix and Remove
downcase
bug instrip_tags
- Fix and Remove preventer of calling a
struct
inside itself - Fix domain core key to prevent it not to check domain when the key is
nil
Improvements:
- Changing the structure of on core key based on the value of the caller
- Support calling struct inside itself
- Separate all test of
GuardedStruct
macro in different files - Add
dialyzer
for GuardedStruct macro
New Contributors
- @MonaAghili made their first contribution in #24
Full Changelog: 0.1.2...0.1.3
Special thanks to @pouriya
0.1.2
We are delighted to introduce our new version of Mishka developer tools library. For more info click on GuardedStruct.
Changelog for MishkaDeveloperTools 0.1.2
- Solving the problem of creating extra
atom
in case of a mistake or an attack on the system. It could be asecurity
issue, please update. - Add allowed parent domain core key
Enum
derive style - Add allowed parent domain core key
either
derive style - Add allowed parent domain core key
equal
derive style - Add allowed parent domain core key
custom
derive style - Add driver for accepting
custom
function - Add status to auto core key if the data of key exists do not create auto value
- Add Conditional field structure
macro
(Multiple states of a field) - Add Supporting new
Typespecs
forlist(struct())
and previous onestruct()
- Add Supporting new sanitizer for
:string_float
- Add Supporting new validation for
:string_float
- Add Supporting new validation for
:some_string_float
Full Changelog: 0.1.1...0.1.2
Special thanks to @pouriya
0.1.1
We are delighted to introduce our new version of Mishka developer tools library. For more info click on GuardedStruct and PermissionAccess.
Changelog for MishkaDeveloperTools 0.1.1
- Add
derive
for sanitizing and validatingEither
- Add
derive
for sanitizing and validatingEnum
, improved - Add
derive
for sanitizing and validatingequal
- Add
exception
when macro is configed forerror: true
, only can be called insidesub_field
andguardedstruct
macro - Add
authorized_fields
validating option forsub_field
andguardedstruct
macro - Calling a struct from another module
- Calling list of structs from another module
- Add capability of having a
field
with list of structs - Add capability of having a
sub_field
with list of structs - Add Automatic generator for a specific key
on
- Add a dependent key to another key
auto
- Add a key to get a value from another key
from
- Add struct information function
- Add transmitting whole output of builder function to its children
- Add new style of builder entries to accept tuple with keys
- Add
auto
,on
,from
core keys for list of structs - Re-structured outputs for new capabilities with backward compatibility
- Add permission access module in runtime
Full Changelog: 0.1.0...0.1.1
0.1.0
We are delighted to introduce our new version of library. For more info click on GuardedStruct.
GuardedStruct
The creation of this macro will allow you to build Structs
that provide you with a number of important options, including the following:
- Validation
- Sanitizing
- Constructor
- It provides the capacity to operate in a nested style simultaneously.
Suppose you are going to collect a number of pieces of information from the user, and before doing anything else, you are going to sanitize them.
After that, you are going to validate each piece of data, and if there are no issues, you will either display it in a proper output or save it somewhere else.
All of the characteristics that are associated with this macro revolve around cleaning and validating the data.
The features that we list below are individually based on a particular strategy and requirement, but thankfully, they may be combined and mixed in any way that you see fit.
Some of the changes in this version:
Changelog for MishkaDeveloperTools 0.1.0
- Add Guardedstruct macro
- Support nested struct in macro
- Add
derive
for Validation and Sanitization - Add custom validator and main validator
- Add custom validator and main validator from finding in a module
- Add
__struct__
,keys
,enforce_keys
andbuilder
functions - Add
required_fields
validation with:halt
status - Add calling nested fields and struct from another module
- Add
Derive.Parser.convert_to_atom_map
to Change string map to atom map - Add
derive
for sanitizing and validatingTrim
- Add
derive
for sanitizing and validatingLowercase
- Add
derive
for sanitizing and validatingUppercase
- Add
derive
for sanitizing and validatingMax
length - Add
derive
for sanitizing and validatingMin
length - Add
derive
for sanitizing and validating Safe Stringfalse
ortrue
value - Add
derive
for sanitizing and validatingEmail
- Add
derive
for sanitizing and validatingLocation
- Add
derive
for sanitizing and validatingDate
- Add
derive
for sanitizing and validatingDateTime
- Add
derive
for sanitizing and validatingbasic_html
sanitize - Add
derive
for sanitizing and validatinghtml5
sanitize - Add
derive
for sanitizing and validatingmarkdown_html
sanitize - Add
derive
for sanitizing and validatingstrip_tags
sanitize - Add
derive
for sanitizing and validatingRegex
runner - Add
derive
for sanitizing and validatingRange
- Add
derive
for sanitizing and validating ValidateURL
- Add
derive
for sanitizing and validating ValidateIPV4
- Add
derive
for sanitizing and validating ValidateEnum
- Add
derive
for sanitizing and validating ValidateTag
- Add
derive
for sanitizing and validating ValidateUUID
- Add
derive
for sanitizing and validating ValidateNot empty string
- Add
derive
for sanitizing and validating ValidateEqual
- Add a
:halt
error to filter validations output from showing afterhalt
error - Update all dependencies to last version
- Fix tests for Elixir
1.15
- Make all dependencies optional based on user requirements
- improve documents
Special thanks to @pouriya and @samdvr
Full Changelog: 0.0.8...0.1.0
0.0.8
We are delighted to introduce our new version of library. In this version (0.0.8), you have better structure for CRUD
macro.
Some of the changes in this version:
Changelog for MishkaDeveloperTools
0.0.8
- Improve CRUD macro
callbacks
andspecs
return fordialyzer
- Add new delete macro and function
- Support UUID and the other type of ID
- Improve testing
- Improving and updating the coding structure