@adaptivestone/framework 3.0.6 → 3.0.9

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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ### 3.0.9
2
+
3
+ [UPDATE] update deps
4
+
5
+ ### 3.0.8
6
+
7
+ [UPDATE] update deps
8
+
9
+ ### 3.0.7
10
+
11
+ [UPDATE] update deps
12
+ [CHANGE] change default getConfig method
13
+
1
14
  ### 3.0.6
2
15
 
3
16
  [UPDATE] update deps
@@ -11,6 +11,14 @@ class AbstractCommand extends Base {
11
11
  return 'Command description';
12
12
  }
13
13
 
14
+ /**
15
+ * Entry point to every command. This method should be overridden
16
+ * @override
17
+ */
18
+ async run() {
19
+ this.logger.error('You should implement run method');
20
+ }
21
+
14
22
  static get loggerGroup() {
15
23
  return 'command';
16
24
  }
@@ -350,6 +350,25 @@ class AbstractController extends Base {
350
350
  }
351
351
  }
352
352
 
353
+ /**
354
+ * Object with routes. Routes relative to controller
355
+ * @example
356
+ * return {
357
+ * post: {
358
+ * "/someUrl": {
359
+ * handler: this.postSomeUrl,
360
+ * request: yup.object().shape({
361
+ * count: yup.number().max(100)required(),
362
+ * })
363
+ * }
364
+ * },
365
+ * };
366
+ */
367
+ get routes() {
368
+ this.logger.warn('Please implement "routes" method on controller.');
369
+ return {};
370
+ }
371
+
353
372
  /**
354
373
  * Array of middlewares to append for route
355
374
  * You should provide path relative to controller and then array of middlewares to apply.
@@ -40,6 +40,14 @@ class AbstractModel extends Base {
40
40
  }
41
41
  }
42
42
 
43
+ /**
44
+ * Mongoose schema
45
+ */
46
+ get modelSchema() {
47
+ this.logger.warn('You should provide modelSchema');
48
+ return {};
49
+ }
50
+
43
51
  static get loggerGroup() {
44
52
  return 'model';
45
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptivestone/framework",
3
- "version": "3.0.6",
3
+ "version": "3.0.9",
4
4
  "description": "Adaptive stone node js framework",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "cors": "^2.8.5",
30
30
  "deepmerge": "^4.2.2",
31
31
  "dotenv": "^16.0.0",
32
- "email-templates": "^8.0.7",
32
+ "email-templates": "^9.0.0",
33
33
  "express": "^4.17.1",
34
34
  "i18next": "^21.2.4",
35
35
  "i18next-chained-backend": "^3.0.2",
package/server.js CHANGED
@@ -102,12 +102,12 @@ class Server {
102
102
  `${configName}.${process.env.NODE_ENV}.js`,
103
103
  ) || envConfig;
104
104
  }
105
-
106
105
  this.cache.configs.set(
107
106
  configName,
108
107
  merge(
109
108
  this.getFileWithExtendingInhirence('config', configName),
110
109
  envConfig,
110
+ { arrayMerge: (destinationArray, sourceArray) => sourceArray },
111
111
  ),
112
112
  );
113
113
  }