@eik/service 2.3.0 → 2.3.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.
- package/CHANGELOG.md +14 -0
- package/lib/config.js +4 -4
- package/lib/utils.js +6 -2
- package/package.json +12 -8
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [2.3.2](https://github.com/eik-lib/service/compare/v2.3.1...v2.3.2) (2024-08-19)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* **deps:** update dependency fastify to v4.28.1 ([5962bc6](https://github.com/eik-lib/service/commit/5962bc68a2417b4d6161e588a5c7c5684beb9adc))
|
7
|
+
|
8
|
+
## [2.3.1](https://github.com/eik-lib/service/compare/v2.3.0...v2.3.1) (2024-08-19)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* add support for windows hosts ([ed263d6](https://github.com/eik-lib/service/commit/ed263d6ed72cc21ad89d0fb3c27b06ca96c6d416))
|
14
|
+
|
1
15
|
# [2.3.0](https://github.com/eik-lib/service/compare/v2.2.1...v2.3.0) (2024-08-14)
|
2
16
|
|
3
17
|
|
package/lib/config.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
import convict from 'convict';
|
3
3
|
import yaml from 'js-yaml';
|
4
4
|
import pino from 'pino';
|
5
|
-
import path
|
5
|
+
import path from 'path';
|
6
6
|
import fs from 'fs';
|
7
7
|
import os from 'os';
|
8
8
|
|
@@ -10,7 +10,7 @@ const CWD = process.cwd();
|
|
10
10
|
|
11
11
|
let pack = {};
|
12
12
|
try {
|
13
|
-
pack = JSON.parse(fs.readFileSync(join(CWD, 'package.json'), 'utf-8'));
|
13
|
+
pack = JSON.parse(fs.readFileSync(path.join(CWD, 'package.json'), 'utf-8'));
|
14
14
|
} catch (error) {
|
15
15
|
/* empty */
|
16
16
|
}
|
@@ -148,7 +148,7 @@ const conf = convict({
|
|
148
148
|
path: {
|
149
149
|
doc: 'Absolute path to store files in when using the "fs" sink',
|
150
150
|
format: String,
|
151
|
-
default: path.join(os.tmpdir(), '
|
151
|
+
default: path.join(os.tmpdir(), 'eik'),
|
152
152
|
env: 'SINK_PATH',
|
153
153
|
},
|
154
154
|
},
|
@@ -163,7 +163,7 @@ const logger = pino({
|
|
163
163
|
});
|
164
164
|
|
165
165
|
try {
|
166
|
-
conf.loadFile(path.join(CWD,
|
166
|
+
conf.loadFile(path.join(CWD, 'config', `${env}.yaml`));
|
167
167
|
} catch (error) {
|
168
168
|
logger.error(error);
|
169
169
|
}
|
package/lib/utils.js
CHANGED
@@ -1,15 +1,19 @@
|
|
1
1
|
import path from 'path';
|
2
2
|
|
3
|
+
function doJoin(a, b) {
|
4
|
+
return path.join(a, b).replace(/\\/g, '/');
|
5
|
+
}
|
6
|
+
|
3
7
|
const sanitizeExtras = (extras, version) => {
|
4
8
|
if (version && extras) {
|
5
|
-
return
|
9
|
+
return doJoin(version, extras);
|
6
10
|
}
|
7
11
|
return extras || '';
|
8
12
|
};
|
9
13
|
|
10
14
|
const sanitizeName = (scope, name) => {
|
11
15
|
if (scope && name) {
|
12
|
-
return
|
16
|
+
return doJoin(scope, name);
|
13
17
|
}
|
14
18
|
return scope || '';
|
15
19
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eik/service",
|
3
|
-
"version": "2.3.
|
3
|
+
"version": "2.3.2",
|
4
4
|
"description": "Eik REST API as a standalone HTTP service",
|
5
5
|
"type": "module",
|
6
6
|
"main": "./lib/main.js",
|
@@ -15,8 +15,10 @@
|
|
15
15
|
"lint": "eslint .",
|
16
16
|
"lint:fix": "eslint --fix .",
|
17
17
|
"start": "node ./bin/eik-server.js | pino-pretty",
|
18
|
-
"test": "cross-env LOG_LEVEL=fatal
|
19
|
-
"test:
|
18
|
+
"test": "cross-env LOG_LEVEL=fatal npm run test:tap",
|
19
|
+
"test:ci": "cross-env LOG_LEVEL=trace npm run test:tap",
|
20
|
+
"test:snapshots": "cross-env LOG_LEVEL=fatal npm run test:tap -- --snapshot",
|
21
|
+
"test:tap": "tap ./test/**/*.test.js --disable-coverage --allow-empty-coverage",
|
20
22
|
"types": "run-s types:module types:test",
|
21
23
|
"types:module": "tsc",
|
22
24
|
"types:test": "tsc --project tsconfig.test.json"
|
@@ -39,15 +41,15 @@
|
|
39
41
|
},
|
40
42
|
"homepage": "https://github.com/eik-lib/service#readme",
|
41
43
|
"dependencies": {
|
42
|
-
"@eik/core": "1.4.
|
44
|
+
"@eik/core": "1.4.2",
|
43
45
|
"@eik/sink": "1.2.5",
|
44
46
|
"@eik/sink-file-system": "1.0.1",
|
45
|
-
"@eik/sink-memory": "1.1.
|
47
|
+
"@eik/sink-memory": "1.1.2",
|
46
48
|
"@fastify/compress": "6.5.0",
|
47
49
|
"@fastify/cors": "8.5.0",
|
48
50
|
"@fastify/jwt": "7.2.4",
|
49
51
|
"convict": "6.2.4",
|
50
|
-
"fastify": "4.28.
|
52
|
+
"fastify": "4.28.1",
|
51
53
|
"http-errors": "2.0.0",
|
52
54
|
"js-yaml": "4.1.0",
|
53
55
|
"pino": "8.21.0"
|
@@ -57,16 +59,18 @@
|
|
57
59
|
"@eik/prettier-config": "1.0.1",
|
58
60
|
"@eik/semantic-release-config": "1.0.0",
|
59
61
|
"@eik/typescript-config": "1.0.0",
|
62
|
+
"@types/mime": "3.0.4",
|
63
|
+
"@types/readable-stream": "4.0.15",
|
60
64
|
"cross-env": "7.0.3",
|
61
65
|
"eslint": "9.8.0",
|
62
66
|
"form-data": "4.0.0",
|
63
|
-
"node-fetch": "3.3.
|
67
|
+
"node-fetch": "3.3.2",
|
64
68
|
"npm-run-all": "4.1.5",
|
65
69
|
"pino-pretty": "10.3.1",
|
66
70
|
"prettier": "3.3.3",
|
67
71
|
"rimraf": "6.0.1",
|
68
72
|
"semantic-release": "24.0.0",
|
69
|
-
"tap": "
|
73
|
+
"tap": "21.0.1",
|
70
74
|
"typescript": "5.5.4",
|
71
75
|
"unique-slug": "4.0.0"
|
72
76
|
}
|