| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2023-04-18 | 4.7 kB | |
| v1.14.0 source code.tar.gz | 2023-04-18 | 314.3 kB | |
| v1.14.0 source code.zip | 2023-04-18 | 436.1 kB | |
| Totals: 3 Items | 755.1 kB | 1 | |
Install
luarocks install lapis
Additions
- Add
--rockspeccommand tolapis new - Add
lapis generate migrationcommand to either create blank migration file or append a new migration at the end of the existing migration file. Seelapis generate migration --helpfor more information - Can append to Lua and MoonScript migrations files. It may not be able to edit all types of migration files, ensure that you return a simple table.
- Support for appending either timestamp named migration or incrementing counter named migration
- Add
lapis generate rockspeccommand to create a new rockspec for managing app dependencies. Seelapis generate rockspec --helpfor more information - It will automatically detect the app name fro the current directory, if not specified with
--app-name - It will automatically detect the git source URL from the current directory if a git repository has been created and has a remote
- Additional initial dependencies can be included with flags like
--postgres,--sqlite,--moonscript, etc.
Fixes
- Fix code reloading for cqueues when changes to
package.path,package.cpath,package.searchers, andpackage.loadersis involved - These values will be reset to prevent infinitely growing module search path when reloading code
- Fix bug with
lapis simulatecommand where header output wouldn't be normalized correctly - Fix bug where
lapis.validate.typesparams_shapewas not correctly passing initial state object through the validation
Changes
- Update custom sub-command runner to support running commands with
argparsespecification - Update built in support for lapis annotate and lapis sytemd to work with this new system. It is necessary to update both of those packages if you wish to use them with this version of Lapis
- Rewrite all template files that
lapis newcreates as generator modules. All of these files can be independently created using thelapis generatecommand if necessary, eg.lapis generate app lapis newwill now internally calllapis generateto create the necessary fileslapis generate {NAME} --helpcan now be used for every template generator to view configuration options-
List of updated generators: (these can be called with
lapis generate {NAME})app– For creating initial lapis application file in (app.luaorapp.moon)config– For creatingconfig.luaorconfig.moonmodels– For creating autoloadermodules.luaormodules.moonmodulegitignore– For creating initial.gitignorewhen usinglapis new --gittupfile– For creating initial Tupfile and Tuprules.tup when usinglapis new --tupnginx.config– For creating initialnginx.confnginx.mime_types– For creatingmime.typesnginx configuration include
-
The default generated config for cqueues on MoonScript now longer includes fields for
code_cacheandnum_workers, and instead now matches the Lua version of the config. lapis.dbdb.clausesupports aprefixoption to optionally append something to the front of the encoded clause if it contains any fields.lapis.db.modelGenericpreloadcan take the a callback function with the name of a relation to execute a callback on the loaded objects. Eg. `preload(users, { profile = function(profiles) ... end })Model:include_inaddskip_includedoption to do nothing on objects that already have the related field loadedModel:include_inaddloaded_results_callbackoption to provide a function callback to be called with with the list of objects that were fetched from the queryModel:include_inwhen loading objects by a composite key, duplicate composite values will be stripped to reduce the size of the query generated (Singular keys already functioned this way)lapis.db.model.relationsmark_loaded_relationscan now take a third argument of a value to set for the relation (defaults totrue)lapis.utilsingularizefunction has been improved slightly with more cases (eg. vertex, child, index, status) and will work with all capital words. Note that this function will never be comprehensive, only suitable for calculating a quick default in scenarios where names aren't explicitly specifiedlapis.validate.typesAddmulti_paramsfor joining twoparams_shapeobjects together
Internal Changes
- Rewrite generic
preload - Add much more comprehensive test suite for generic
preload
Full Changelog: https://github.com/leafo/lapis/compare/v1.13.1...v1.14.0