@bool-ts/core 1.5.3 → 1.5.5

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.
@@ -177,7 +177,11 @@ export const BoolFactory = (target, options) => {
177
177
  }
178
178
  }
179
179
  }
180
- await middlewareCollection.func(...middlewareArguments);
180
+ const middlewareResult = await middlewareCollection.func(...middlewareArguments);
181
+ if (!(middlewareResult instanceof Response)) {
182
+ continue;
183
+ }
184
+ return middlewareResult;
181
185
  }
182
186
  // Execute guard(s)
183
187
  for (let i = 0; i < guardGroup.length; i++) {
@@ -0,0 +1,2 @@
1
+ export interface IController<T = any> {
2
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export interface IModule<T = any> {
2
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bool-ts/core",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -247,7 +247,13 @@ export const BoolFactory = (target: new (...args: any[]) => unknown, options: TB
247
247
  }
248
248
  }
249
249
 
250
- await middlewareCollection.func(...middlewareArguments);
250
+ const middlewareResult = await middlewareCollection.func(...middlewareArguments);
251
+
252
+ if (!(middlewareResult instanceof Response)) {
253
+ continue;
254
+ }
255
+
256
+ return middlewareResult;
251
257
  }
252
258
 
253
259
  // Execute guard(s)
@@ -0,0 +1,3 @@
1
+ export interface IDispatcher<T = any> {
2
+ execute(...args: any[]): T;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface IGuard {
2
+ enforce(...args: any[]): boolean | Promise<boolean>;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface IMiddleware<T = any> {
2
+ enforce(...args: any[]): T;
3
+ }
File without changes
File without changes
File without changes
File without changes