Skip to content

v1.12.0

Compare
Choose a tag to compare
@leafo leafo released this 09 Jan 21:56
· 186 commits to master since this release

Install

luarocks install lapis

Additions

  • Add the lapis.validate.types module with tableshape compatible types for parameter validation: params_shape, assert_error, cleaned_text, valid_text, trimmed_text, truncated_text, limited_text, empty, file_upload, db_id, db_enum
  • lapis.validate Add the with_params helper function for wrapping action function with parameter validation
  • lapis.util.utf8 Add string_length function for counting the number of characters in a string
  • The lapis new command will always write a config.lua/config.moon file. The default configuration's nginx specific variables will be phased out a future update
  • The lapis generate sub commands now can generate both Lua and MoonScript files. Project type detection has been added, in addition to flags to directly specify the file type

Changes

  • The lapis command line tool's argument parsing has been rewritten using argparse. New help commands are available for every command, with full argument documentation.
  • The lapis generate subcommands now use argparse and have full command line documentation available
  • The lapis new command will now fail if the requested server type is not available. The --force option can be used to bypass the error
  • The default nginx.conf file now include an init_by_lua block as an example to suppress global variable warning
  • Command line third-party sub commands now are executed using the _ command. See lapis help _
  • lapis.application yield_error now has a default error message if one isn't provided
  • lapis.validate assert_valid can take a tableshape object as the validation object. Will return transformed value and state on success
  • lapis.db encode_clause will now generate query with capital NOT when using false value

Misc

  • Internal reorganization for command line commands and path library
  • Revised documentation for input validation

Full Changelog: v1.11.1...v1.12.0