Skip to content

Releases: mishka-group/mishka_developer_tools

0.1.8

02 Nov 06:04
Compare
Choose a tag to compare

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

01 Jul 19:16
Compare
Choose a tag to compare

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:

Based on elixir-lang/elixir#13699

Full Changelog: 0.1.6...0.1.7

0.1.6

29 Jun 15:08
Compare
Choose a tag to compare

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:

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

09 Apr 22:15
Compare
Choose a tag to compare

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 from caller
  • Add uuid from ecto
  • Add keys and enforce keys in __information__ function
  • Add some helpers like: timestamp, validated_user? and validation username

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 inside validator and not load main_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

17 Feb 11:07
Compare
Choose a tag to compare

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:

  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

19 Dec 12:36
Compare
Choose a tag to compare

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 derive conditional_field and normal derive
  • Support domain key inside children fields
  • Support new derives: not_flatten_empty, not_flatten_empty_item as validation
  • Support not_empty and max_len, min_len for list in validation derive.

Fixed bugs:

  • Fix and Remove downcase bug in strip_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

Full Changelog: 0.1.2...0.1.3

Special thanks to @pouriya

0.1.2

07 Nov 10:59
Compare
Choose a tag to compare

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 a security 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 for list(struct()) and previous one struct()
  • 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

12 Sep 14:14
Compare
Choose a tag to compare

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 validating Either
  • Add derive for sanitizing and validating Enum, improved
  • Add derive for sanitizing and validating equal
  • Add exception when macro is configed for error: true, only can be called inside sub_field and guardedstruct macro
  • Add authorized_fields validating option for sub_field and guardedstruct 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

Special thanks to @pouriya, @toomaj and @samdvr

0.1.0

22 Aug 15:24
Compare
Choose a tag to compare

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:

  1. Validation
  2. Sanitizing
  3. Constructor
  4. 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 and builder 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 validating Trim
  • Add derive for sanitizing and validating Lowercase
  • Add derive for sanitizing and validating Uppercase
  • Add derive for sanitizing and validating Max length
  • Add derive for sanitizing and validating Min length
  • Add derive for sanitizing and validating Safe String false or true value
  • Add derive for sanitizing and validating Email
  • Add derive for sanitizing and validating Location
  • Add derive for sanitizing and validating Date
  • Add derive for sanitizing and validating DateTime
  • Add derive for sanitizing and validating basic_html sanitize
  • Add derive for sanitizing and validating html5 sanitize
  • Add derive for sanitizing and validating markdown_html sanitize
  • Add derive for sanitizing and validating strip_tags sanitize
  • Add derive for sanitizing and validating Regex runner
  • Add derive for sanitizing and validating Range
  • Add derive for sanitizing and validating Validate URL
  • Add derive for sanitizing and validating Validate IPV4
  • Add derive for sanitizing and validating Validate Enum
  • Add derive for sanitizing and validating Validate Tag
  • Add derive for sanitizing and validating Validate UUID
  • Add derive for sanitizing and validating Validate Not empty string
  • Add derive for sanitizing and validating Validate Equal
  • Add a :halt error to filter validations output from showing after halt 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

25 Nov 10:02
Compare
Choose a tag to compare

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 and specs return for dialyzer
  • Add new delete macro and function
  • Support UUID and the other type of ID
  • Improve testing
  • Improving and updating the coding structure