Releases: flex-development/mango
Releases · flex-development/mango
v5.1.0
v5.0.0
⚠ BREAKING CHANGES
- dtos: integrate
DTOFilter
✨ Features
- types:
DTOFilter
(b861719)
♻️ Code Improvements
- dtos: integrate
DTOFilter
(ec86961)
🔨 Build
- use
@flex-development/[email protected]
(fde654a)
v4.0.1
v4.0.0
⚠ BREAKING CHANGES
- repo:
MangoRepository extends AbstractMangoRepository
- mango: rename
*.resetCache
methods to*.setCache
🐛 Fixes
- type instantiation is excessively deep and possibly infinite (b3f4ea6)
💅 Formatting & Structure
- mango: rename
*.resetCache
methods to*.setCache
(68bb0fb) - repo: use
F
in generics to represent field paths ofdto
(ea6708a)
📖 Documentation
- mango: fix use of
@throws {Exception}
(6bcab30) - mango: sorting rules (de2707c)
- validator: update code sample in
README
(04de572)
♻️ Code Improvements
- repo:
MangoRepository extends AbstractMangoRepository
(2367918) - validator: use
ObjectUnknown
as defaultE
in generic (92f5c57)
✨ Features
- abstracts: add
AbstractMangoFinder
(fbb8c4b) - abstracts: add
AbstractMangoRepository
(7ac2164) - finder: add
AbstractMangoFinder#uid
(e0d9dc1) - interfaces: add
IAbstractMangoRepository
(48a6111) - interfaces: add
IMangoRepositoryAsync
(8df94de) - plugins: add
MangoFinderAsync
(b2c51df) - repositories:
MangoRepositoryAsync
(e4def6a)
v3.1.1
v3.1.0
🔨 Build
- deps: upgrade to
@flex-development/[email protected]
(36e4e21)
v3.0.0
⚠ BREAKING CHANGES
- plugins: MangoFinder - rename
MangoFinderPlugin*
definitions toMangoFinder*
✨ Features
💅 Formatting & Structure
- plugins: MangoFinder - rename
MangoFinderPlugin*
definitions toMangoFinder*
(0e99498)
✏️ Housekeeping
- update github release script logic (bd57029)
- use github release script from ts-pkg template (5623d5f)
📖 Documentation
v2.0.0
v1.0.0 (🎂 First Release)
Overview
Plugin for mingo and qs-to-mongo.
The Mango plugin allows users to run aggregation pipelines and execute searches against in-memory object collections. Query documents using a URL query, or search for them using a query criteria and options object.
Plugin documentation can be viewed here.
/**
* `Mango` plugin interface.
*
* - https://github.com/kofrasa/mingo
* - https://github.com/fox1t/qs-to-mongo
*
* @template D - Document (collection object)
* @template U - Name of document uid field
* @template P - Search parameters (query criteria and options)
* @template Q - Parsed URL query object
*/
export interface IMango<
D extends PlainObject = PlainObject,
U extends keyof D = '_id',
P extends MangoSearchParams<D> = MangoSearchParams<D>,
Q extends MangoParsedUrlQuery<D> = MangoParsedUrlQuery<D>
> {
readonly cache: Readonly<MangoCache<D>>
readonly logger: Debugger
readonly mingo: typeof mingo
readonly mparser: IMangoParser<D>
readonly options: MangoOptions<D, U>
aggregate(
pipeline?: OneOrMany<AggregationStages<D>>
): AggregationPipelineResult<D>
find(params?: P): DocumentPartial<D, U>[]
findByIds(uids?: NumberString[], params?: P): DocumentPartial<D, U>[]
findOne(uid: NumberString, params?: P): DocumentPartial<D, U> | null
findOneOrFail(uid: NumberString, params?: P): DocumentPartial<D, U>
query(query?: Q | string): DocumentPartial<D, U>[]
queryByIds(uids?: NumberString[], query?: Q | string): DocumentPartial<D, U>[]
queryOne(uid: NumberString, query?: Q | string): DocumentPartial<D, U> | null
queryOneOrFail(uid: NumberString, query?: Q | string): DocumentPartial<D, U>
resetCache(collection?: D[]): MangoCache<D>
}
What's changed?
Everything! It's the first version.
Features
- Run aggregation pipelines
- Perform searches (with query criteria and URL queries)
- Parse and convert URL query objects and strings