Download Latest Version v1.16.0 source code.zip (453.9 kB)
Email in envelope

Get an email when there's a new version of Lapis

Home / v1.12.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2023-01-09 2.1 kB
v1.12.0 source code.tar.gz 2023-01-09 288.3 kB
v1.12.0 source code.zip 2023-01-09 400.5 kB
Totals: 3 Items   690.9 kB 0

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: https://github.com/leafo/lapis/compare/v1.11.1...v1.12.0

Source: README.md, updated 2023-01-09