not-node 4.0.20 → 4.0.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-node",
3
- "version": "4.0.20",
3
+ "version": "4.0.21",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/common.js CHANGED
@@ -183,11 +183,11 @@ module.exports.tryFile = (filePath) => {
183
183
  * Generates paths object for module/index.js files based on content and relative
184
184
  * path
185
185
  * @param {Array<string>} content list of module components ['models', 'logics', 'routes',...]
186
- * @param {string} relative relative path to parent folder of components
186
+ * @param {string} relative path to parent folder of components
187
187
  * @param {Object} paths object for module/index.js
188
188
  **/
189
189
  module.exports.generatePaths = (content = [], relative = 'src') => {
190
- const toPath = (name) => path.join(__dirname, relative, name);
190
+ const toPath = (name) => path.join(relative, name);
191
191
  return content.reduce((prev, cur) => {
192
192
  prev[cur] = toPath(cur);
193
193
  return prev;
@@ -5,7 +5,7 @@ module.exports = {
5
5
  refPath: 'ownerModel',
6
6
  required: false,
7
7
  safe: {
8
- update: ['@owner', 'root', 'admin'],
8
+ update: ['root', 'admin'],
9
9
  read: ['@owner', 'root', 'admin']
10
10
  }
11
11
  }
@@ -0,0 +1,4 @@
1
+ module.exports = [{
2
+ validator: 'isMongoId',
3
+ message: 'owner_is_not_valid'
4
+ }];