systemlynx 1.9.3 → 1.9.5

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/API.md CHANGED
@@ -101,13 +101,6 @@ constr OrdersConstructor = function () {
101
101
  const Users = Service.module("Users", UsersConstructor);
102
102
 
103
103
  const Orders = Service.module("Orders", OrdersConstructor);
104
-
105
- Orders.before('find', (req, res, next)=>{
106
-
107
- })
108
- Orders.before((req, res, next)=>{
109
-
110
- })
111
104
  ```
112
105
 
113
106
  ## Service.startService(options)
package/README.md CHANGED
@@ -171,11 +171,3 @@ Service.module("Orders", function () {
171
171
 
172
172
  Service.startService({ route: "test/service", port: "4400", host: "localhost" });
173
173
  ```
174
-
175
- # temp
176
-
177
- /\* systemlynx
178
-
179
- 1. update systemlynx config to work to create universal values that are applied to every module. Every prop or method add to the this value or the App.config method will be applied to all this value through out the system. So we should use the SystemContext class that I already created to implement this.
180
- 2. any method that begins with a dollar sign will not be exposed to the client
181
- \*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systemlynx",
3
- "version": "1.9.3",
3
+ "version": "1.9.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,11 +11,16 @@ module.exports = function createApp(server, WebSocket, customClient) {
11
11
  const systemContext = SystemLynxContext(system);
12
12
  const App = new createDispatcher(undefined, systemContext);
13
13
  const plugins = [];
14
- setTimeout(() => {
14
+ const init = () => {
15
15
  plugins.forEach((plugin) => {
16
16
  if (typeof plugin === "function") plugin.apply({}, [App, system]);
17
17
  });
18
18
  initializeApp(system, App, customClient, systemContext);
19
+ };
20
+
21
+ let timeoutId = setTimeout(() => {
22
+ timeoutId = null;
23
+ init();
19
24
  }, 0);
20
25
 
21
26
  if (isNode) {
@@ -23,6 +28,12 @@ module.exports = function createApp(server, WebSocket, customClient) {
23
28
 
24
29
  App.startService = (options) => {
25
30
  system.routing = options;
31
+ if (!timeoutId) {
32
+ timeoutId = setTimeout(() => {
33
+ timeoutId = null;
34
+ init();
35
+ }, 0);
36
+ }
26
37
  return App;
27
38
  };
28
39