@eleven-am/pondsocket-nest 0.0.7 → 0.0.8
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
|
@@ -115,6 +115,11 @@ declare class Context<Path extends string = string, Event extends PondEvenType =
|
|
|
115
115
|
*/
|
|
116
116
|
getInstance(): any;
|
|
117
117
|
|
|
118
|
+
/**
|
|
119
|
+
* @desc The path of the current context
|
|
120
|
+
*/
|
|
121
|
+
getMethod(): string;
|
|
122
|
+
|
|
118
123
|
/**
|
|
119
124
|
* @desc Saves data to the current context
|
|
120
125
|
*/
|
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.getInstance(), context.
|
|
19
|
+
const gottenValues = (_a = (0, parametres_1.manageParameters)(context.getInstance(), context.getMethod()).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.getInstance(), context.
|
|
26
|
+
const methodGuards = (0, guards_1.manageGuards)(context.getInstance(), context.getMethod()).get();
|
|
27
27
|
const guards = []
|
|
28
28
|
.concat(classGuards, methodGuards)
|
|
29
29
|
.map((Guard) => retrieveGuard(moduleRef, Guard));
|