@adaptivestone/framework 3.0.5 → 3.0.8
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 +9 -0
- package/modules/AbstractCommand.js +8 -0
- package/modules/AbstractController.js +19 -0
- package/modules/AbstractModel.js +8 -0
- package/package.json +2 -2
- package/server.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -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.
|
package/modules/AbstractModel.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptivestone/framework",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.8",
|
|
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": "^
|
|
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
|
}
|