@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.
@@ -85,6 +85,9 @@ class Context {
85
85
  getHandler() {
86
86
  return this.instance[this.propertyKey];
87
87
  }
88
+ getInstance() {
89
+ return this.instance;
90
+ }
88
91
  addData(key, value) {
89
92
  this.data[key] = value;
90
93
  }
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eleven-am/pondsocket-nest",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
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.getClass(), context.getHandler()).get()) !== null && _a !== void 0 ? _a : [];
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),
@@ -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.getClass(), context.getHandler()).get();
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));