@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.
@@ -88,6 +88,9 @@ class Context {
88
88
  getInstance() {
89
89
  return this.instance;
90
90
  }
91
+ getMethod() {
92
+ return this.propertyKey;
93
+ }
91
94
  addData(key, value) {
92
95
  this.data[key] = value;
93
96
  }
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eleven-am/pondsocket-nest",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "PondSocket is a fast simple socket server",
5
5
  "keywords": [
6
6
  "socket",
@@ -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.getHandler()).get()) !== null && _a !== void 0 ? _a : [];
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),
@@ -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.getHandler()).get();
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));