@eik/service 2.0.17 → 2.0.21
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 +28 -0
- package/lib/config.js +4 -5
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [2.0.21](https://github.com/eik-lib/service/compare/v2.0.20...v2.0.21) (2021-11-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency pino to v7.4.0 ([e1fe3f0](https://github.com/eik-lib/service/commit/e1fe3f0f66efc6a8fe80cbd0b48a874fdd99d2f5))
|
|
7
|
+
|
|
8
|
+
## [2.0.20](https://github.com/eik-lib/service/compare/v2.0.19...v2.0.20) (2021-11-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency pino to v7.3.0 ([f36bd7e](https://github.com/eik-lib/service/commit/f36bd7e8f7ebdbdf68546b414ca58b7f41d2b736))
|
|
14
|
+
|
|
15
|
+
## [2.0.19](https://github.com/eik-lib/service/compare/v2.0.18...v2.0.19) (2021-11-15)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **deps:** update dependency fastify to v3.24.0 ([ad8c877](https://github.com/eik-lib/service/commit/ad8c877fad58d694fe7978d909a5e1868be93631))
|
|
21
|
+
|
|
22
|
+
## [2.0.18](https://github.com/eik-lib/service/compare/v2.0.17...v2.0.18) (2021-11-15)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* Make config be read from import folder ([#331](https://github.com/eik-lib/service/issues/331)) ([7018442](https://github.com/eik-lib/service/commit/701844227d0226f679dd35ba17579692f35a9c93))
|
|
28
|
+
|
|
1
29
|
## [2.0.17](https://github.com/eik-lib/service/compare/v2.0.16...v2.0.17) (2021-11-15)
|
|
2
30
|
|
|
3
31
|
|
package/lib/config.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import convict from 'convict';
|
|
2
2
|
import yaml from 'js-yaml';
|
|
3
3
|
import pino from 'pino';
|
|
4
|
-
import path, {
|
|
4
|
+
import path, { join } from 'path';
|
|
5
5
|
import fs from 'fs';
|
|
6
6
|
import os from 'os';
|
|
7
|
-
import { fileURLToPath } from 'url';
|
|
8
7
|
|
|
9
|
-
const
|
|
8
|
+
const CWD = process.cwd();
|
|
10
9
|
|
|
11
10
|
let pack = {};
|
|
12
11
|
try {
|
|
13
|
-
pack = JSON.parse(fs.readFileSync(join(
|
|
12
|
+
pack = JSON.parse(fs.readFileSync(join(CWD, 'package.json')));
|
|
14
13
|
} catch (error) {
|
|
15
14
|
/* empty */
|
|
16
15
|
}
|
|
@@ -160,7 +159,7 @@ const logger = pino({
|
|
|
160
159
|
});
|
|
161
160
|
|
|
162
161
|
try {
|
|
163
|
-
conf.loadFile(path.join(
|
|
162
|
+
conf.loadFile(path.join(CWD, `/config/${env}.yaml`));
|
|
164
163
|
} catch (error) {
|
|
165
164
|
logger.error(error);
|
|
166
165
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eik/service",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.21",
|
|
4
4
|
"description": "Eik REST API as a standalone HTTP service",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/main.js",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@eik/core": "1.2.28",
|
|
37
37
|
"convict": "6.2.1",
|
|
38
|
-
"fastify": "3.
|
|
38
|
+
"fastify": "3.24.0",
|
|
39
39
|
"fastify-compress": "3.6.1",
|
|
40
40
|
"fastify-cors": "6.0.2",
|
|
41
41
|
"fastify-jwt": "3.2.1",
|
|
42
42
|
"http-errors": "1.8.1",
|
|
43
43
|
"js-yaml": "4.1.0",
|
|
44
|
-
"pino": "7.
|
|
44
|
+
"pino": "7.4.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@babel/eslint-parser": "7.16.3",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"pino-pretty": "7.2.0",
|
|
58
58
|
"prettier": "2.4.1",
|
|
59
59
|
"semantic-release": "18.0.0",
|
|
60
|
-
"tap": "15.
|
|
60
|
+
"tap": "15.1.2",
|
|
61
61
|
"unique-slug": "2.0.2"
|
|
62
62
|
}
|
|
63
63
|
}
|