@tahminator/sapling 2.0.2 → 2.0.3

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/dist/index.cjs CHANGED
@@ -694,7 +694,14 @@ Split these into separate @MiddlewareClass classes, or merge the logic into a si
694
694
  if (schemas) {
695
695
  if (schemas.body) request.body = await _parseOrThrow(schemas.body, request.body, "reqbody");
696
696
  if (schemas.param) request.params = await _parseOrThrow(schemas.param, request.params, "reqparams");
697
- if (schemas.query) request.query = await _parseOrThrow(schemas.query, request.query, "reqquery");
697
+ if (schemas.query) {
698
+ const parsedQuery = await _parseOrThrow(schemas.query, request.query, "reqquery");
699
+ Object.defineProperty(request, "query", {
700
+ value: parsedQuery,
701
+ writable: true,
702
+ configurable: true
703
+ });
704
+ }
698
705
  }
699
706
  const result = await fn.bind(controllerInstance)(request, response, next);
700
707
  if (result instanceof ResponseEntity) {
package/dist/index.mjs CHANGED
@@ -670,7 +670,14 @@ Split these into separate @MiddlewareClass classes, or merge the logic into a si
670
670
  if (schemas) {
671
671
  if (schemas.body) request.body = await _parseOrThrow(schemas.body, request.body, "reqbody");
672
672
  if (schemas.param) request.params = await _parseOrThrow(schemas.param, request.params, "reqparams");
673
- if (schemas.query) request.query = await _parseOrThrow(schemas.query, request.query, "reqquery");
673
+ if (schemas.query) {
674
+ const parsedQuery = await _parseOrThrow(schemas.query, request.query, "reqquery");
675
+ Object.defineProperty(request, "query", {
676
+ value: parsedQuery,
677
+ writable: true,
678
+ configurable: true
679
+ });
680
+ }
674
681
  }
675
682
  const result = await fn.bind(controllerInstance)(request, response, next);
676
683
  if (result instanceof ResponseEntity) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tahminator/sapling",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "author": "Tahmid Ahmed",
5
5
  "description": "A library to help you write cleaner Express.js code",
6
6
  "repository": {