@eleven-am/pondsocket-nest 0.0.6 → 0.0.7
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/context/context.js +3 -0
- package/index.d.ts +5 -0
- package/package.json +1 -1
- package/performers/action.js +1 -1
- package/performers/guards.js +1 -1
package/context/context.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -110,6 +110,11 @@ declare class Context<Path extends string = string, Event extends PondEvenType =
|
|
|
110
110
|
*/
|
|
111
111
|
getHandler (): any;
|
|
112
112
|
|
|
113
|
+
/**
|
|
114
|
+
* @desc The instance reference of the current context
|
|
115
|
+
*/
|
|
116
|
+
getInstance(): any;
|
|
117
|
+
|
|
113
118
|
/**
|
|
114
119
|
* @desc Saves data to the current context
|
|
115
120
|
*/
|
package/package.json
CHANGED
package/performers/action.js
CHANGED
|
@@ -16,7 +16,7 @@ const context_1 = require("../context/context");
|
|
|
16
16
|
const parametres_1 = require("../managers/parametres");
|
|
17
17
|
function retrieveParameters(context) {
|
|
18
18
|
var _a;
|
|
19
|
-
const gottenValues = (_a = (0, parametres_1.manageParameters)(context.
|
|
19
|
+
const gottenValues = (_a = (0, parametres_1.manageParameters)(context.getInstance(), context.getHandler()).get()) !== null && _a !== void 0 ? _a : [];
|
|
20
20
|
const values = gottenValues
|
|
21
21
|
.map(({ callback, index }) => ({
|
|
22
22
|
value: callback(context),
|
package/performers/guards.js
CHANGED
|
@@ -23,7 +23,7 @@ function retrieveGuard(moduleRef, Guard) {
|
|
|
23
23
|
function performGuards(moduleRef, context) {
|
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
25
|
const classGuards = (0, guards_1.manageGuards)(context.getClass()).get();
|
|
26
|
-
const methodGuards = (0, guards_1.manageGuards)(context.
|
|
26
|
+
const methodGuards = (0, guards_1.manageGuards)(context.getInstance(), context.getHandler()).get();
|
|
27
27
|
const guards = []
|
|
28
28
|
.concat(classGuards, methodGuards)
|
|
29
29
|
.map((Guard) => retrieveGuard(moduleRef, Guard));
|