@nativewrappers/redm 0.0.99 → 0.0.100

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.
@@ -15,9 +15,9 @@ function Exports(exportName) {
15
15
  throw new Error("Exports does not work on private methods, please mark the method as public");
16
16
  }
17
17
  context.addInitializer(function() {
18
- exports(exportName, (...args) => {
18
+ exports(exportName, async (...args) => {
19
19
  try {
20
- return originalMethod.call(this, ...args);
20
+ return await originalMethod.call(this, ...args);
21
21
  } catch (err) {
22
22
  REMOVE_EVENT_LOG: {
23
23
  if (!GlobalData.EnablePrettyPrint) return;
@@ -27,6 +27,7 @@ function Exports(exportName) {
27
27
  console.error(`Error: ${err}`);
28
28
  console.error("------- END EXPORT ERROR --------");
29
29
  }
30
+ throw err;
30
31
  }
31
32
  });
32
33
  });
@@ -39,9 +40,9 @@ function Event(eventName) {
39
40
  throw new Error("Event does not work on private methods, please mark the method as public");
40
41
  }
41
42
  context.addInitializer(function() {
42
- on(eventName, (...args) => {
43
+ on(eventName, async (...args) => {
43
44
  try {
44
- return originalMethod.call(this, ...args);
45
+ return await originalMethod.call(this, ...args);
45
46
  } catch (e) {
46
47
  REMOVE_EVENT_LOG: {
47
48
  if (!GlobalData.EnablePrettyPrint) return;
@@ -63,7 +64,7 @@ function NetEvent(eventName, remoteOnly = true) {
63
64
  throw new Error("NetEvent does not work on private methods, please mark the method as public");
64
65
  }
65
66
  context.addInitializer(function() {
66
- onNet(eventName, (...args) => {
67
+ onNet(eventName, async (...args) => {
67
68
  const src = source;
68
69
  try {
69
70
  $CLIENT: {
@@ -71,7 +72,7 @@ function NetEvent(eventName, remoteOnly = true) {
71
72
  return;
72
73
  }
73
74
  }
74
- return originalMethod.call(this, ...args);
75
+ return await originalMethod.call(this, ...args);
75
76
  } catch (e) {
76
77
  REMOVE_NET_EVENT_LOG: {
77
78
  if (!GlobalData.EnablePrettyPrint) return;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "license": "MIT",
10
10
  "type": "module",
11
- "version": "0.0.99",
11
+ "version": "0.0.100",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/nativewrappers/nativewrappers.git"