crud

NestJs CRUD for RESTful APIs

MIT License

Downloads
365.9K
Stars
3.9K
Committers
44

Bot releases are hidden (Show)

crud - v4.6.2 Latest Release

Published by michaelyali over 4 years ago

4.6.2 - 2020-05-14

Bug Fixes

  • typeorm - fixed selected fields on joins (#510). Kudos to @jbrousseau for finding this bug
crud - v4.6.1

Published by michaelyali over 4 years ago

4.6.1 - 2020-05-08

Bug Fixes

  • typeorm - fixed query generation when a column display name differs from its name in db #401). Kudos to @farhad2161 for finding this bug
crud - v4.6.0

Published by michaelyali over 4 years ago

4.6.0 - 2020-05-07

Features

  • crud/typeorm - added select (boolean) to join options which allows to join relation but not select it (#218)

Bug Fixes

  • typeorm - fixed column identifier for MySQL (#401)
  • typeorm - fixed nested relations aliases, filtering, sorting (#419, #450, #267, #385)
crud - v4.5.0

Published by michaelyali over 4 years ago

4.5.0 - 2020-05-01

Improvements

  • crud - added enum support for params Swagger. Kudos to @tbrannam

Bug Fixes

  • crud - fixed auth property definition. Kudos to @lafeuil
  • typeorm - fixed request generation with aliases (#321, #401). Kudos to @joennlae
crud - v4.4.3

Published by michaelyali over 4 years ago

4.4.3 - 2020-04-18

Bug Fixes

  • crud fixed returning pageCount in some cases (#465)
  • typeorm fixed critical bug with possible SQL injections when using query ?sort= (big kudos to @joaogmauricio)
  • typeorm fixed filter conditions for LIKE/iLIKE operators (#395)
crud - v4.4.2

Published by michaelyali over 4 years ago

4.4.2 - 2020-03-17

Bug Fixes

  • crud fixed custom routes params caused by NestJs v7 breaking changes (#443)
crud - v4.4.1

Published by michaelyali almost 5 years ago

4.4.1 - 2019-12-28

Bug Fixes

  • crud fixed CrudRequestInterceptor validation status code from 500 to 400 (#374, #247)
crud - v4.4.0

Published by michaelyali almost 5 years ago

4.4.0 - 2019-12-27

Features

  • crud added serialize to the global options
crud - v4.3.0

Published by michaelyali almost 5 years ago

4.3.0 - 2019-12-21

Features

  • crud added dto to the CrudOptions (#132)
  • crud added serialize to the CrudOptions
  • crud added search query param and a new search condition api
  • crud added new condition operators: $eqL, $neL, $startsL, $endsL, $contL, $exclL, $inL, $notinL for case insensitive queries (#77)
  • crud added @crudAuth() class decorator for authorized requests

Improvements

  • crud CrudRequestInterceptor can be used for both crud and non-crud controllers or for custom routes within crud controller
  • crud support @nestjs/swagger major versions: v3 and v4 (#340)
  • crud added returnShallow option to the CrudOptions.routes createOneBase, updateOneBase, replaceOneBase methods (#158)
  • crud added alias to the CrudOptions.join (#350)
  • crud added alwaysPaginate to the CrudOptions.query, can be used globally as well (#213)
  • crud CrudOptions.query.filter can be a function that returns transformed search object
  • crud added disabled for an objects withing CrudOptions.params
  • request query builder: now uses qs package
  • request query builder: filter and or methods can accept array of filter objects
  • typeorm changed visibility of all methods (#226)
  • typeorm use ILIKE for PostgreSQL (#212)

Bug Fixes

  • crud swagger: fixed response models (#350)
  • crud swagger: fixed query params (#196)
  • crud swagger: fixed renamed params (#283)
  • crud swagger: fixed swagger method decoration on overridden methods
  • crud query parser: fixed parsing integers when it's a big int
  • typeorm fixed load embedded entities (#138)
  • typeorm fixed left join issues (#31, #98)
  • typeorm fixed composite key joins (#238)
  • typeorm fixed entity events (#51)
  • typeorm all methods return entity instances (#259)
crud - v4.2.0

Published by michaelyali about 5 years ago

4.2.0 - 2019-07-26

Features

  • crud added support for older versions of UUID (#186)

Bug Fixes

  • crud fixed BulkDto swagger description (#159)
  • crud fixed CrudRequestInterceptor request parsing
  • requests added @nestjsx/util as a dependency (#184)
  • requests fixed condition operators mapping (#148)
  • requests fixed ISO date string validation (#161)
  • typeorm fixed filtering and sorting by nested fields (#105)
  • typeorm fixed too many nested levels exception (#87)
  • typeorm fixed pagination pageCount (#179)

Deps

  • dev updated deps
crud - v4.1.0

Published by michaelyali over 5 years ago

4.1.0 - 2019-06-27

Features

  • crud added PUT request handling (#107 )
  • requests added creating request builder with params (#131 )
  • requests improved query params naming parsing (#101 )

Bug Fixes

  • crud set decorators after Swagger so metadata can be overwritten
  • requests added support for ISO-8610 date strings
crud - v4.0.1

Published by michaelyali over 5 years ago

4.0.1 - 2019-06-21

Bug Fixes

  • requests fixed query parser to properly accept numbers and booleans (#97)
crud - v.4.0.0

Published by michaelyali over 5 years ago

4.0.0 (2019-06-12)

BREAKING CHANGES

  • crud: changed CrudOptions (docs)
  • crud: remove decorators: @ParsedOptions, @ParsedParams, @ParsedQuery. Add decorator @ParsedRequest instead.
  • crud: change interfaces
  • services: remove RestfulOptions from services
  • services: changed base abstract class

Features

  • repo: refactor to monorepository
  • docs: new documentation
  • packages: totally refactor @nestjsx/crud to be service (ORM) agnostic
  • packages: add @nestjsx/crud-typeorm (docs)
  • packages: add @nestjsx/crud-request (docs, #53)
  • crud: add global options (docs, #64)
  • crud: add eager relations option (#54, #67)

Bug Fixes

  • several fixes
crud - v.3.2.0

Published by michaelyali over 5 years ago

Features:

  • controller - added UsePathInterceptors decorator that allows to wire up RestfulQueryInterceptor and RestfulParamsInterceptor on custom CrudController routes (those interceptors are already wired up on @Override() routes) (#45)
  • repository service - added simple findOne and find methods (link to the repo methods)
crud - v.3.1.0

Published by michaelyali over 5 years ago

Enhancements:

  • crud: added @ParsedBody() route param decorator. It's very helpful if you need to override a method with default validation kept in place. Also, no need to create your own BulkDto in overridden createManyBase method any more until you really need to.
crud - v.3.0.0

Published by michaelyali over 5 years ago

Features:

  • routes:
    • choose routes that should be created or excluded (#30)
    • interceptors can be added to each route options
    • optional return entity on DELETE request (#34)
    • optional allow override URL params values by PATCH request body
  • params:
    • allow selecting each URL param type (number, uuid, string). Validation and transforming has been added
    • allow select any slug URL param name that differs from id. e.g. providing { params: { slug: 'uuid' } } will be processed as GET | PATCH | DELETE /:slug; will validate slug as uuid string; and will be making a SELECT query by slug column (#11)

Enhancements:

  • crud:
    • added pagination data to the getManyBase request (data, count, total, page, pageCount). Along with the ability to add interceptors without method overriding, this should totaly fix (#12, #18 )
    • added nested filtering (#42)
    • removed helpers in CrudController (getParamsFilter and getMergedOptions). Added helpful custom route decorators instead (@ParsedQuery, @ParsedParams, @ParsedOptions)
    • a lot of micro improvements. CrudController became more ORM agnostic.
    • method overriding became more easy.

Bugs

  • crud:
    • fixed Swagger documentation on an overridden method (#17)
    • added examples to Swagger (#17)
    • refactored to use NestJs 6
crud - v.2.1.0

Published by michaelyali over 5 years ago

Features

  • joins - added nested joins for query #23
crud - v.2.0.0

Published by michaelyali almost 6 years ago

Features

  • swagger - added support for Swagger #6
  • additional - added getFeature and getAction helpers for getting metadata from a controller and a route (docs)

Breaking Changes

  • @Crud() accepts CrudOptions that contains options, params. Controller properties paramsFilter, options are deprecated

Bug Fixes

  • cacheId generation update
crud - v.1.1.0

Published by michaelyali almost 6 years ago

Package Rankings
Top 1.03% on Npmjs.org
Top 6.73% on Proxy.golang.org
Badges
Extracted from project README
Stand With Ukraine