not-node 5.0.22 → 5.1.2

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.
Files changed (126) hide show
  1. package/.eslintrc.json +1 -1
  2. package/bin/not-deploy.js +52 -0
  3. package/index.js +21 -19
  4. package/package.json +1 -1
  5. package/src/app.js +61 -58
  6. package/src/auth/abstract.js +17 -19
  7. package/src/auth/const.js +8 -12
  8. package/src/auth/fields.js +143 -124
  9. package/src/auth/index.js +14 -14
  10. package/src/auth/roles.js +64 -63
  11. package/src/auth/routes.js +89 -54
  12. package/src/auth/rules.js +63 -63
  13. package/src/auth/session.js +60 -62
  14. package/src/bootstrap/form.js +13 -13
  15. package/src/bootstrap/logic.js +45 -41
  16. package/src/bootstrap/model.js +14 -17
  17. package/src/bootstrap/route.js +132 -53
  18. package/src/common.js +86 -79
  19. package/src/core/fields/ID.js +6 -6
  20. package/src/core/fields/__closed.js +3 -3
  21. package/src/core/fields/__latest.js +3 -3
  22. package/src/core/fields/__version.js +3 -3
  23. package/src/core/fields/__versions.js +3 -3
  24. package/src/core/fields/_id.js +6 -6
  25. package/src/core/fields/active.js +9 -9
  26. package/src/core/fields/codeName.js +9 -9
  27. package/src/core/fields/createdAt.js +17 -17
  28. package/src/core/fields/default.js +9 -9
  29. package/src/core/fields/description.js +11 -11
  30. package/src/core/fields/email.js +9 -9
  31. package/src/core/fields/enabled.js +9 -9
  32. package/src/core/fields/expiredAt.js +16 -16
  33. package/src/core/fields/height.js +11 -11
  34. package/src/core/fields/ip.js +10 -10
  35. package/src/core/fields/objectId.js +10 -10
  36. package/src/core/fields/owner.js +13 -13
  37. package/src/core/fields/ownerModel.js +11 -11
  38. package/src/core/fields/price.js +11 -11
  39. package/src/core/fields/requiredObject.js +10 -10
  40. package/src/core/fields/session.js +10 -10
  41. package/src/core/fields/size.js +11 -11
  42. package/src/core/fields/telephone.js +9 -9
  43. package/src/core/fields/title.js +15 -15
  44. package/src/core/fields/updatedAt.js +17 -17
  45. package/src/core/fields/userId.js +11 -12
  46. package/src/core/fields/uuid.js +11 -11
  47. package/src/core/fields/validators/email.js +6 -4
  48. package/src/core/fields/validators/owner.js +6 -4
  49. package/src/core/fields/width.js +11 -11
  50. package/src/domain.js +435 -431
  51. package/src/env.js +23 -23
  52. package/src/error.js +20 -23
  53. package/src/exceptions/db.js +23 -0
  54. package/src/exceptions/http.js +43 -0
  55. package/src/fields/index.js +106 -111
  56. package/src/form/fabric.js +19 -24
  57. package/src/form/form.js +195 -186
  58. package/src/form/index.js +2 -2
  59. package/src/generic/index.js +2 -0
  60. package/src/generic/logic.js +595 -0
  61. package/src/generic/route.js +76 -0
  62. package/src/init/additional.js +7 -7
  63. package/src/init/app.js +75 -68
  64. package/src/init/bodyparser.js +14 -14
  65. package/src/init/compression.js +6 -7
  66. package/src/init/core.js +12 -12
  67. package/src/init/cors.js +22 -24
  68. package/src/init/db/index.js +41 -43
  69. package/src/init/db/ioredis.js +28 -20
  70. package/src/init/db/mongoose.js +42 -32
  71. package/src/init/db/redis.js +59 -48
  72. package/src/init/env.js +44 -36
  73. package/src/init/express.js +18 -21
  74. package/src/init/fileupload.js +8 -10
  75. package/src/init/http.js +65 -47
  76. package/src/init/index.js +141 -148
  77. package/src/init/informer.js +7 -9
  78. package/src/init/methodoverride.js +4 -6
  79. package/src/init/middleware.js +23 -26
  80. package/src/init/modules.js +4 -4
  81. package/src/init/monitoring.js +8 -8
  82. package/src/init/rateLimiter.js +53 -45
  83. package/src/init/routes.js +67 -69
  84. package/src/init/security.js +37 -33
  85. package/src/init/sequence.js +111 -107
  86. package/src/init/sequence.standart.js +54 -56
  87. package/src/init/sessions/index.js +21 -21
  88. package/src/init/sessions/mongoose.js +49 -36
  89. package/src/init/sessions/redis.js +28 -27
  90. package/src/init/static.js +53 -40
  91. package/src/init/template.js +17 -17
  92. package/src/lib.js +230 -200
  93. package/src/manifest/batchRunner.js +26 -25
  94. package/src/manifest/initializator/forms.js +24 -24
  95. package/src/manifest/initializator/index.js +8 -10
  96. package/src/manifest/initializator/manifests.js +45 -42
  97. package/src/manifest/initializator/models.js +37 -34
  98. package/src/manifest/manifest.filter.js +130 -97
  99. package/src/manifest/manifest.js +103 -77
  100. package/src/manifest/module.js +350 -360
  101. package/src/manifest/registrator/fields.js +90 -85
  102. package/src/manifest/registrator/forms.js +47 -47
  103. package/src/manifest/registrator/index.js +14 -16
  104. package/src/manifest/registrator/locales.js +17 -16
  105. package/src/manifest/registrator/logics.js +66 -64
  106. package/src/manifest/registrator/models.js +64 -62
  107. package/src/manifest/registrator/routes.js +171 -132
  108. package/src/manifest/registrator/routes.ws.js +109 -103
  109. package/src/manifest/route.js +216 -161
  110. package/src/model/buildValidator.js +53 -42
  111. package/src/model/default.js +304 -286
  112. package/src/model/enrich.js +69 -61
  113. package/src/model/increment.js +124 -137
  114. package/src/model/proto.js +179 -148
  115. package/src/model/routine.js +85 -76
  116. package/src/model/utils.js +33 -0
  117. package/src/model/versioning.js +148 -130
  118. package/src/obsolete.js +12 -8
  119. package/src/parser.js +29 -22
  120. package/src/repos.js +29 -31
  121. package/src/rollup.js +75 -65
  122. package/src/shell.helpers.js +28 -28
  123. package/static.js +31 -0
  124. package/src/generic/router.js +0 -16
  125. package/src/manifest/module.models.js +0 -0
  126. package/src/manifest/module.status.js +0 -0
@@ -1,33 +1,32 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const logger = require('not-log');
4
- const log = logger(module, 'registrator');
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+ const logger = require("not-log");
4
+ const log = logger(module, "registrator");
5
5
 
6
- const {tryFile, mapBind} = require('../../common');
6
+ const { tryFile, mapBind } = require("../../common");
7
7
 
8
- const notModuleRegistratorRoutesWS = require('./routes.ws');
8
+ const notModuleRegistratorRoutesWS = require("./routes.ws");
9
9
 
10
10
  /**
11
11
  * Manifest files ending
12
12
  * @constant
13
13
  * @type {string}
14
14
  */
15
- const DEFAULT_MANIFEST_FILE_ENDING = '.manifest.js';
15
+ const DEFAULT_MANIFEST_FILE_ENDING = ".manifest.js";
16
16
 
17
17
  /**
18
18
  * Routes collection files ending
19
19
  * @constant
20
20
  * @type {string}
21
21
  */
22
- const DEFAULT_ROUTES_FILE_ENDING = '.js';
23
-
22
+ const DEFAULT_ROUTES_FILE_ENDING = ".js";
24
23
 
25
24
  /**
26
25
  * WS End-points collection files ending
27
26
  * @constant
28
27
  * @type {string}
29
28
  */
30
- const DEFAULT_WS_ROUTES_FILE_ENDING = '.ws.js';
29
+ const DEFAULT_WS_ROUTES_FILE_ENDING = ".ws.js";
31
30
 
32
31
  /**
33
32
  * List of methods to be binded from notApp to routes and WS end-points
@@ -35,139 +34,179 @@ const DEFAULT_WS_ROUTES_FILE_ENDING = '.ws.js';
35
34
  * @type {string}
36
35
  */
37
36
  const ROUTE_BINDINGS_LIST = [
38
- 'getLogic', 'getLogicFile',
39
- 'getModel', 'getModelFile', 'getModelSchema',
40
- 'getModule'
37
+ "getLogic",
38
+ "getLogicFile",
39
+ "getModel",
40
+ "getModelFile",
41
+ "getModelSchema",
42
+ "getModule",
41
43
  ];
42
44
 
45
+ module.exports = class notModuleRegistratorRoutes {
46
+ static openFile = require;
43
47
 
44
- module.exports = class notModuleRegistratorRoutes{
45
- static openFile = require;
48
+ constructor({ nModule }) {
49
+ this.run({ nModule });
50
+ }
46
51
 
47
- constructor({nModule}){
48
- this.run({nModule});
49
- }
52
+ run({ nModule }) {
53
+ const srcDir = notModuleRegistratorRoutes.getPath(nModule);
54
+ if (!srcDir) {
55
+ return false;
56
+ }
57
+ this.findAll({
58
+ nModule,
59
+ srcDir,
60
+ });
61
+ return true;
62
+ }
50
63
 
51
- run({nModule}){
52
- const srcDir = notModuleRegistratorRoutes.getPath(nModule);
53
- if (!srcDir) { return false; }
54
- this.findAll(
55
- {
56
- nModule,
57
- srcDir
58
- }
59
- );
60
- return true;
61
- }
62
-
63
- static getPath(nModule){
64
- return nModule.module.paths.routes;
65
- }
66
-
67
- /**
68
- * Searching fields in directory
69
- * @static
70
- * @param {Object} input
71
- * @param {notModule} input.notModule
72
- * @param {string} input.srcDir
73
- **/
74
- findAll({nModule,srcDir}){
75
- fs.readdirSync(srcDir).forEach(file => this.findOne({nModule, file, srcDir}));
76
- }
77
-
78
- findOne({nModule, srcDir, file}){
79
- try {
80
- //если имя похоже на название манифеста
81
- if (file.indexOf(DEFAULT_MANIFEST_FILE_ENDING) === -1) { return false; }
82
- const routeManifest = notModuleRegistratorRoutes.tryRouteManifestFile({srcDir, file});
83
- //без манифеста ничего выставить наружу не выйдет
84
- if(!routeManifest){ return false; }
85
- const routeBasename = file.substr(0, file.indexOf(DEFAULT_MANIFEST_FILE_ENDING));
86
- //ищем end-points
87
- const route = notModuleRegistratorRoutes.tryRouteFile({srcDir, routeBasename});
88
- const wsRoute = notModuleRegistratorRoutes.tryWSRouteFile({srcDir, routeBasename});
89
- if(!route && !wsRoute){ return false; }
90
- this.registerManifestAndRoutes({
91
- nModule,
92
- routeManifest,
93
- routeName: route?route.thisRouteName:routeBasename,
94
- route, wsRoute
95
- });
96
- return true;
97
- } catch (e) {
98
- log.error(e);
99
- return false;
64
+ static getPath(nModule) {
65
+ return nModule.module.paths.routes;
100
66
  }
101
- }
102
-
103
- static tryRouteFile({srcDir, routeBasename}){
104
- const routePath = path.join(srcDir, routeBasename + DEFAULT_ROUTES_FILE_ENDING);
105
- if (tryFile(routePath)) {
106
- const route = notModuleRegistratorRoutes.openFile(routePath);
107
- route.filename = routePath;
108
- if (!route.thisRouteName) {
109
- route.thisRouteName = routeBasename;
110
- }
111
- return route;
112
- }else{
113
- return false;
67
+
68
+ /**
69
+ * Searching fields in directory
70
+ * @static
71
+ * @param {Object} input
72
+ * @param {notModule} input.notModule
73
+ * @param {string} input.srcDir
74
+ **/
75
+ findAll({ nModule, srcDir }) {
76
+ fs.readdirSync(srcDir).forEach((file) =>
77
+ this.findOne({ nModule, file, srcDir })
78
+ );
114
79
  }
115
- }
116
-
117
- static tryRouteManifestFile({srcDir, file}){
118
- const routeManifestPath = path.join(srcDir, file);
119
- if (tryFile(routeManifestPath)) {
120
- return notModuleRegistratorRoutes.openFile(routeManifestPath);
121
- }else{
122
- return false;
80
+
81
+ findOne({ nModule, srcDir, file }) {
82
+ try {
83
+ //если имя похоже на название манифеста
84
+ if (file.indexOf(DEFAULT_MANIFEST_FILE_ENDING) === -1) {
85
+ return false;
86
+ }
87
+ const routeManifest =
88
+ notModuleRegistratorRoutes.tryRouteManifestFile({
89
+ srcDir,
90
+ file,
91
+ });
92
+ //без манифеста ничего выставить наружу не выйдет
93
+ if (!routeManifest) {
94
+ return false;
95
+ }
96
+ const routeBasename = file.substr(
97
+ 0,
98
+ file.indexOf(DEFAULT_MANIFEST_FILE_ENDING)
99
+ );
100
+ //ищем end-points
101
+ const route = notModuleRegistratorRoutes.tryRouteFile({
102
+ srcDir,
103
+ routeBasename,
104
+ });
105
+ const wsRoute = notModuleRegistratorRoutes.tryWSRouteFile({
106
+ srcDir,
107
+ routeBasename,
108
+ });
109
+ if (!route && !wsRoute) {
110
+ return false;
111
+ }
112
+ this.registerManifestAndRoutes({
113
+ nModule,
114
+ routeManifest,
115
+ routeName: route ? route.thisRouteName : routeBasename,
116
+ route,
117
+ wsRoute,
118
+ });
119
+ return true;
120
+ } catch (e) {
121
+ log.error(e);
122
+ return false;
123
+ }
123
124
  }
124
- }
125
-
126
-
127
- static tryWSRouteFile({srcDir, routeBasename}){
128
- const routeWSPath = path.join(srcDir, routeBasename + DEFAULT_WS_ROUTES_FILE_ENDING);
129
- if (tryFile(routeWSPath)) {
130
- const wsRoute = notModuleRegistratorRoutes.openFile(routeWSPath);
131
- if (!wsRoute.thisRouteName) {
132
- wsRoute.thisRouteName = routeBasename;
133
- }
134
- return wsRoute;
135
- }else{
136
- return false;
125
+
126
+ static tryRouteFile({ srcDir, routeBasename }) {
127
+ const routePath = path.join(
128
+ srcDir,
129
+ routeBasename + DEFAULT_ROUTES_FILE_ENDING
130
+ );
131
+ if (tryFile(routePath)) {
132
+ const route = notModuleRegistratorRoutes.openFile(routePath);
133
+ route.filename = routePath;
134
+ if (!route.thisRouteName) {
135
+ route.thisRouteName = routeBasename;
136
+ }
137
+ return route;
138
+ } else {
139
+ return false;
140
+ }
137
141
  }
138
- }
139
-
140
- registerManifestAndRoutes({nModule, routeName, routeManifest, route, wsRoute}){
141
- notModuleRegistratorRoutes.registerManifest({nModule, routeManifest, routeName});
142
- if (route) {
143
- this.registerRoute({
144
- nModule, route, routeName: route.thisRouteName
145
- });
142
+
143
+ static tryRouteManifestFile({ srcDir, file }) {
144
+ const routeManifestPath = path.join(srcDir, file);
145
+ if (tryFile(routeManifestPath)) {
146
+ return notModuleRegistratorRoutes.openFile(routeManifestPath);
147
+ } else {
148
+ return false;
149
+ }
146
150
  }
147
- if (wsRoute) {
148
- this.registerWSRoute({nModule, wsRoute});
151
+
152
+ static tryWSRouteFile({ srcDir, routeBasename }) {
153
+ const routeWSPath = path.join(
154
+ srcDir,
155
+ routeBasename + DEFAULT_WS_ROUTES_FILE_ENDING
156
+ );
157
+ if (tryFile(routeWSPath)) {
158
+ const wsRoute = notModuleRegistratorRoutes.openFile(routeWSPath);
159
+ if (!wsRoute.thisRouteName) {
160
+ wsRoute.thisRouteName = routeBasename;
161
+ }
162
+ return wsRoute;
163
+ } else {
164
+ return false;
165
+ }
166
+ }
167
+
168
+ registerManifestAndRoutes({
169
+ nModule,
170
+ routeName,
171
+ routeManifest,
172
+ route,
173
+ wsRoute,
174
+ }) {
175
+ notModuleRegistratorRoutes.registerManifest({
176
+ nModule,
177
+ routeManifest,
178
+ routeName,
179
+ });
180
+ if (route) {
181
+ this.registerRoute({
182
+ nModule,
183
+ route,
184
+ routeName: route.thisRouteName,
185
+ });
186
+ }
187
+ if (wsRoute) {
188
+ this.registerWSRoute({ nModule, wsRoute });
189
+ }
190
+ }
191
+
192
+ registerRoute({ nModule, route, routeName }) {
193
+ nModule.setRoute(route.thisRouteName, route);
194
+ if (nModule.appIsSet()) {
195
+ mapBind(nModule.getApp(), route, ROUTE_BINDINGS_LIST);
196
+ }
197
+ route.log = logger(route, `Route#${routeName}`);
198
+ route.getThisModule = () => nModule;
199
+ }
200
+
201
+ registerWSRoute({ nModule, wsRoute }) {
202
+ new notModuleRegistratorRoutesWS({
203
+ nModule,
204
+ wsRoute: wsRoute,
205
+ wsRouteName: wsRoute.thisRouteName,
206
+ });
149
207
  }
150
- }
151
208
 
152
- registerRoute({nModule, route, routeName}) {
153
- nModule.setRoute(route.thisRouteName, route);
154
- if (nModule.appIsSet()) {
155
- mapBind(nModule.getApp(), route, ROUTE_BINDINGS_LIST);
209
+ static registerManifest({ nModule, routeManifest, routeName }) {
210
+ nModule.setManifest(routeName, routeManifest);
156
211
  }
157
- route.log = logger(route, `Route#${routeName}`);
158
- route.getThisModule = () => nModule;
159
- }
160
-
161
-
162
- registerWSRoute({nModule, wsRoute}){
163
- new notModuleRegistratorRoutesWS({
164
- nModule,
165
- wsRoute: wsRoute,
166
- wsRouteName: wsRoute.thisRouteName
167
- });
168
- }
169
-
170
- static registerManifest({nModule, routeManifest, routeName}) {
171
- nModule.setManifest(routeName, routeManifest);
172
- }
173
212
  };
@@ -1,4 +1,4 @@
1
- const {mapBind, objHas} = require('../../common');
1
+ const { mapBind, objHas } = require("../../common");
2
2
 
3
3
  /**
4
4
  * List of methods to be binded from notApp to routes and WS end-points
@@ -6,122 +6,128 @@ const {mapBind, objHas} = require('../../common');
6
6
  * @type {string}
7
7
  */
8
8
  const WS_ROUTE_BINDINGS_LIST = [
9
- 'getLogic', 'getLogicFile',
10
- 'getModel', 'getModelFile', 'getModelSchema',
11
- 'getModule'
9
+ "getLogic",
10
+ "getLogicFile",
11
+ "getModel",
12
+ "getModelFile",
13
+ "getModelSchema",
14
+ "getModule",
12
15
  ];
13
16
 
14
- module.exports = class notModuleRegistratorRoutesWS{
15
- constructor({
16
- nModule,
17
- wsRoute,
18
- wsRouteName
19
- }){
20
- this.run({
21
- nModule,
22
- wsRoute,
23
- wsRouteName
24
- });
25
- }
17
+ module.exports = class notModuleRegistratorRoutesWS {
18
+ constructor({ nModule, wsRoute, wsRouteName }) {
19
+ this.run({
20
+ nModule,
21
+ wsRoute,
22
+ wsRouteName,
23
+ });
24
+ }
26
25
 
27
- run({
28
- nModule,
29
- wsRoute,
30
- wsRouteName
31
- }) {
32
- if (nModule.appIsSet()) {
33
- const input = {
34
- nModule,
35
- wsRoute,
36
- wsRouteName
37
- };
38
- this.registerServers(input);
39
- this.registerClients(input);
26
+ run({ nModule, wsRoute, wsRouteName }) {
27
+ if (nModule.appIsSet()) {
28
+ const input = {
29
+ nModule,
30
+ wsRoute,
31
+ wsRouteName,
32
+ };
33
+ this.registerServers(input);
34
+ this.registerClients(input);
35
+ }
40
36
  }
41
- }
42
37
 
43
- registerServers(input){
44
- this.registerCollectionType({
45
- ...input,
46
- collectionType: 'servers'
47
- });
48
- }
38
+ registerServers(input) {
39
+ this.registerCollectionType({
40
+ ...input,
41
+ collectionType: "servers",
42
+ });
43
+ }
49
44
 
50
- registerClients(input){
51
- this.registerCollectionType({
52
- ...input,
53
- collectionType: 'clients'
54
- });
55
- }
45
+ registerClients(input) {
46
+ this.registerCollectionType({
47
+ ...input,
48
+ collectionType: "clients",
49
+ });
50
+ }
56
51
 
57
- registerCollectionType({
58
- nModule,
59
- wsRoute, wsRouteName,
60
- collectionType
61
- }) {
62
- if (!objHas(wsRoute, collectionType)) { return false; }
63
- Object.keys(wsRoute[collectionType]).forEach(
64
- (collectionName) => this.registerCollectionItem({
65
- nModule,
66
- wsRoute, wsRouteName,
67
- collectionType, collectionName,
68
- })
69
- );
70
- return true;
71
- }
52
+ registerCollectionType({ nModule, wsRoute, wsRouteName, collectionType }) {
53
+ if (!objHas(wsRoute, collectionType)) {
54
+ return false;
55
+ }
56
+ Object.keys(wsRoute[collectionType]).forEach((collectionName) =>
57
+ this.registerCollectionItem({
58
+ nModule,
59
+ wsRoute,
60
+ wsRouteName,
61
+ collectionType,
62
+ collectionName,
63
+ })
64
+ );
65
+ return true;
66
+ }
72
67
 
73
- registerCollectionItem({
74
- nModule,
75
- wsRoute, wsRouteName,
76
- collectionType, collectionName,
77
- }){
78
- const collection = wsRoute[collectionType][collectionName];
79
- mapBind(nModule.getApp(), collection, WS_ROUTE_BINDINGS_LIST);
80
- this.registerEndPoints({
81
- nModule,
82
- wsRoute, wsRouteName,
83
- collectionType, collectionName, collection
84
- });
85
- }
68
+ registerCollectionItem({
69
+ nModule,
70
+ wsRoute,
71
+ wsRouteName,
72
+ collectionType,
73
+ collectionName,
74
+ }) {
75
+ const collection = wsRoute[collectionType][collectionName];
76
+ mapBind(nModule.getApp(), collection, WS_ROUTE_BINDINGS_LIST);
77
+ this.registerEndPoints({
78
+ nModule,
79
+ wsRoute,
80
+ wsRouteName,
81
+ collectionType,
82
+ collectionName,
83
+ collection,
84
+ });
85
+ }
86
86
 
87
+ registerEndPoints({
88
+ nModule,
89
+ wsRouteName,
90
+ collectionType,
91
+ collectionName,
92
+ collection,
93
+ }) {
94
+ Object.keys(collection).forEach((endPointType) => {
95
+ const endPoints = collection[endPointType];
96
+ //creating deep object structure if not exists
97
+ nModule.createEmptyIfNotExistsRouteWSType({
98
+ collectionType,
99
+ collectionName,
100
+ endPointType,
101
+ });
102
+ //
103
+ notModuleRegistratorRoutesWS.addEntityEndPointsOfType({
104
+ nModule,
105
+ endPoints,
106
+ collectionType,
107
+ collectionName,
108
+ endPointType,
109
+ wsRouteName,
110
+ });
111
+ });
112
+ }
87
113
 
88
- registerEndPoints({
89
- nModule,
90
- wsRouteName,
91
- collectionType, collectionName, collection
92
- }){
93
- Object.keys(collection).forEach((endPointType) => {
94
- const endPoints = collection[endPointType];
95
- //creating deep object structure if not exists
96
- nModule.createEmptyIfNotExistsRouteWSType({
97
- collectionType, collectionName, endPointType
98
- });
99
- //
100
- notModuleRegistratorRoutesWS.addEntityEndPointsOfType({
114
+ static addEntityEndPointsOfType({
101
115
  nModule,
102
116
  endPoints,
103
- collectionType, collectionName,
104
- endPointType, wsRouteName
105
- });
106
- });
107
- }
108
-
109
- static addEntityEndPointsOfType({
110
- nModule,
111
- endPoints,
112
- collectionType, collectionName,
113
- endPointType, wsRouteName
114
- }){
115
- Object.keys(endPoints).forEach((endPointName) => {
116
- nModule.setRouteWS({
117
117
  collectionType,
118
118
  collectionName,
119
119
  endPointType,
120
120
  wsRouteName,
121
- action: endPointName,
122
- func: endPoints[endPointName]
123
- });
124
- });
125
- }
126
-
121
+ }) {
122
+ Object.keys(endPoints).forEach((endPointName) => {
123
+ nModule.setRouteWS({
124
+ collectionType,
125
+ collectionName,
126
+ endPointType,
127
+ wsRouteName,
128
+ action: endPointName,
129
+ func: endPoints[endPointName],
130
+ });
131
+ });
132
+ }
127
133
  };