@adaptivestone/framework 3.3.0 → 3.4.0

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 CHANGED
@@ -1,3 +1,7 @@
1
+ ### 3.4.0
2
+
3
+ [NEW] now we pass 'req' to validation and casting as a second parameter. This done mostly for custom validators
4
+
1
5
  ### 3.3.0
2
6
 
3
7
  [NEW] new command 'SyncIndexes' to sync indexes for mongodb https://framework.adaptivestone.com/docs/cli#syncindexes
@@ -210,6 +210,7 @@ class AbstractController extends Base {
210
210
  try {
211
211
  await routeObject.request.validate(bodyAndQuery, {
212
212
  abortEarly: controllerValidationAbortEarly,
213
+ req,
213
214
  });
214
215
  } catch (e) {
215
216
  let { errors } = e;
@@ -243,6 +244,7 @@ class AbstractController extends Base {
243
244
  bodyAndQuery,
244
245
  {
245
246
  stripUnknown: true,
247
+ req,
246
248
  },
247
249
  );
248
250
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptivestone/framework",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "Adaptive stone node js framework",
5
5
  "main": "src/index.js",
6
6
  "engines": {