monastery 3.0.8 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +2 -0
- package/docs/readme.md +5 -0
- package/lib/index.js +4 -1
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [3.0.9](https://github.com/boycce/monastery/compare/3.0.8...3.0.9) (2024-04-30)
|
|
6
|
+
|
|
5
7
|
### [3.0.8](https://github.com/boycce/monastery/compare/3.0.7...3.0.8) (2024-04-30)
|
|
6
8
|
|
|
7
9
|
### [3.0.7](https://github.com/boycce/monastery/compare/3.0.5...3.0.7) (2024-04-29)
|
package/docs/readme.md
CHANGED
|
@@ -94,6 +94,11 @@ You can view MongoDB's [compatibility table here](https://www.mongodb.com/docs/d
|
|
|
94
94
|
- db.catch/then() moved to db.onError/db.onOpen()
|
|
95
95
|
- next() is now redundant when returning promises from hooks, e.g. `afterFind: [async (data) => {...}]`
|
|
96
96
|
|
|
97
|
+
## v2 Breaking Changes
|
|
98
|
+
|
|
99
|
+
- changed model.messages, array paths now must include '.$'
|
|
100
|
+
- updated AWS to client v3 (requires ES6 features, NodeJs >=14)
|
|
101
|
+
|
|
97
102
|
## Roadmap
|
|
98
103
|
|
|
99
104
|
- Add Aggregate
|
package/lib/index.js
CHANGED
|
@@ -174,14 +174,17 @@ Manager.prototype.isId = function(value) {
|
|
|
174
174
|
return util.isId(value)
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
Manager.prototype.models = async function(pathname,
|
|
177
|
+
Manager.prototype.models = async function(pathname, opts) {
|
|
178
178
|
/**
|
|
179
179
|
* Setup model definitions from a folder location
|
|
180
180
|
* @param {string} pathname
|
|
181
|
+
* @param {object} opts:
|
|
182
|
+
* @param {boolean} opts.waitForIndexes - Wait for indexes to be created?
|
|
181
183
|
* @return {Promise(object)} - e.g. { user: , article: , .. }
|
|
182
184
|
* @this Manager
|
|
183
185
|
*/
|
|
184
186
|
let out = {}
|
|
187
|
+
let { waitForIndexes } = opts || {}
|
|
185
188
|
if (!pathname || typeof pathname !== 'string') {
|
|
186
189
|
throw 'The path must be a valid pathname'
|
|
187
190
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "monastery",
|
|
3
3
|
"description": "⛪ A simple, straightforward MongoDB ODM",
|
|
4
4
|
"author": "Ricky Boyce",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.9",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "github:boycce/monastery",
|
|
8
8
|
"homepage": "https://boycce.github.io/monastery/",
|