@lykmapipo/mongoose-common 0.39.0 → 0.40.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.babelrc +12 -0
- package/.editorconfig +14 -0
- package/.eslintignore +1 -0
- package/.eslintrc +11 -0
- package/.prettierignore +0 -1
- package/CHANGELOG.md +16 -0
- package/LICENSE +2 -2
- package/README.md +22 -8
- package/SECURITY.md +3 -0
- package/es/index.js +1151 -0
- package/lib/index.js +1290 -0
- package/package.json +101 -38
- package/rollup.config.js +26 -0
- package/{lib → src}/.gitkeep +0 -0
- package/{index.js → src/index.js} +209 -226
- package/src/plugins/.gitkeep +0 -0
- package/src/plugins/error.plugin.js +183 -0
- package/src/plugins/path.plugin.js +39 -0
- package/{lib → src/plugins}/seed.plugin.js +120 -70
- package/.jsbeautifyrc +0 -7
- package/lib/error.plugin.js +0 -163
- package/lib/path.plugin.js +0 -43
package/.babelrc
ADDED
package/.editorconfig
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# top-most EditorConfig file
|
2
|
+
root = true
|
3
|
+
|
4
|
+
# Unix-style newlines with a newline ending every file
|
5
|
+
[*]
|
6
|
+
end_of_line = lf
|
7
|
+
insert_final_newline = true
|
8
|
+
indent_style = space
|
9
|
+
indent_size = 2
|
10
|
+
|
11
|
+
# Matches multiple files with brace expansion notation
|
12
|
+
# Set default charset
|
13
|
+
[*.{js}]
|
14
|
+
charset = utf-8
|
package/.eslintignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
src/predefine.apidoc.js
|
package/.eslintrc
ADDED
package/.prettierignore
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
docs
|
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
#### 0.40.0 (2021-09-27)
|
2
|
+
|
3
|
+
##### Chores
|
4
|
+
|
5
|
+
* **release:** compile latest source ([6bd384a1](https://github.com/lykmapipo/mongoose-common/commit/6bd384a15405769b8ab437caae80b1a4cd0c324c))
|
6
|
+
* **deps:** force latest version & audit fix ([097ebf76](https://github.com/lykmapipo/mongoose-common/commit/097ebf76ef2811096edb315a0f95bf9b3067a23f))
|
7
|
+
|
8
|
+
##### Other Changes
|
9
|
+
|
10
|
+
* migrate to mongoose v6 ([25d89389](https://github.com/lykmapipo/mongoose-common/commit/25d893893fff8ba94a3bc3978fab5f3abb316989))
|
11
|
+
|
12
|
+
##### Refactors
|
13
|
+
|
14
|
+
* use named imports ([0713b619](https://github.com/lykmapipo/mongoose-common/commit/0713b619bf3a2457944597f105493a8547dbe4da))
|
15
|
+
* migrate to es6 ([a7aa7662](https://github.com/lykmapipo/mongoose-common/commit/a7aa76627f45fe9723a459852dabff57df50795e))
|
16
|
+
|
1
17
|
#### 0.39.0 (2020-12-29)
|
2
18
|
|
3
19
|
##### Bug Fixes
|
package/LICENSE
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) lykmapipo & Contributors
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
6
|
|
7
7
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
8
|
|
9
|
-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
@@ -1,13 +1,25 @@
|
|
1
1
|
# mongoose-common
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.
|
4
|
-
[![Dependencies Status](https://david-dm.org/lykmapipo/mongoose-common
|
3
|
+
[![Build Status](https://app.travis-ci.com/lykmapipo/mongoose-common.svg?branch=master)](https://app.travis-ci.com/lykmapipo/mongoose-common)
|
4
|
+
[![Dependencies Status](https://david-dm.org/lykmapipo/mongoose-common.svg)](https://david-dm.org/lykmapipo/mongoose-common)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/github/lykmapipo/mongoose-common/badge.svg?branch=master)](https://coveralls.io/github/lykmapipo/mongoose-common?branch=master)
|
6
|
+
[![GitHub License](https://img.shields.io/github/license/lykmapipo/mongoose-common)](https://github.com/lykmapipo/mongoose-common/blob/develop/LICENSE)
|
7
|
+
|
8
|
+
[![Commitizen Friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
|
9
|
+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
|
10
|
+
[![Code Style](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)
|
11
|
+
[![npm version](https://img.shields.io/npm/v/@lykmapipo/mongoose-common)](https://www.npmjs.com/package/@lykmapipo/mongoose-common)
|
5
12
|
|
6
13
|
Re-usable helpers for mongoose
|
7
14
|
|
15
|
+
**Note: This version no longer support [mongoose-schema-jsonschema](https://github.com/DScheglov/mongoose-schema-jsonschema)**
|
16
|
+
|
8
17
|
## Requirements
|
9
18
|
|
10
|
-
- NodeJS
|
19
|
+
- [NodeJS v13+](https://nodejs.org)
|
20
|
+
- [Npm v6.12+](https://www.npmjs.com/)
|
21
|
+
- [MongoDB v4+](https://www.mongodb.com/)
|
22
|
+
- [Mongoose v6+](https://github.com/Automattic/mongoose)
|
11
23
|
|
12
24
|
## Install
|
13
25
|
```sh
|
@@ -17,13 +29,14 @@ $ npm install --save mongoose @lykmapipo/mongoose-common
|
|
17
29
|
## Usage
|
18
30
|
|
19
31
|
```javascript
|
20
|
-
|
32
|
+
import mongoose from 'mongoose';
|
33
|
+
import {
|
21
34
|
connect,
|
22
35
|
clear,
|
23
36
|
syncIndexes,
|
24
37
|
disconnect,
|
25
38
|
drop
|
26
|
-
}
|
39
|
+
} from '@lykmapipo/mongoose-common';
|
27
40
|
|
28
41
|
connect(error => { ... });
|
29
42
|
|
@@ -192,13 +205,14 @@ $ npm test
|
|
192
205
|
## Contribute
|
193
206
|
It will be nice, if you open an issue first so that we can know what is going on, then, fork this repo and push in your ideas. Do not forget to add a bit of test(s) of what value you adding.
|
194
207
|
|
195
|
-
##
|
208
|
+
## License
|
209
|
+
|
196
210
|
The MIT License (MIT)
|
197
211
|
|
198
|
-
Copyright (c)
|
212
|
+
Copyright (c) CodeTanzania & Contributors
|
199
213
|
|
200
214
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
201
215
|
|
202
216
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
203
217
|
|
204
|
-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
218
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/SECURITY.md
ADDED