@drunkcod/express-kit 0.0.5 → 0.0.6
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/lib/index.js +3 -3
- package/package.json +7 -4
package/lib/index.js
CHANGED
|
@@ -37,11 +37,11 @@ const closeAsync = (server) => (new Promise((resolve, reject) => {
|
|
|
37
37
|
});
|
|
38
38
|
}));
|
|
39
39
|
function registerShutdown(server, shutdown) {
|
|
40
|
-
|
|
40
|
+
const onShutdown = onceAsync(async () => {
|
|
41
41
|
await closeAsync(server);
|
|
42
42
|
if (shutdown)
|
|
43
43
|
await shutdown();
|
|
44
44
|
});
|
|
45
|
-
process.on('SIGINT',
|
|
46
|
-
process.on('SIGTERM',
|
|
45
|
+
process.on('SIGINT', onShutdown);
|
|
46
|
+
process.on('SIGTERM', onShutdown);
|
|
47
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drunkcod/express-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Express4 utility things",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
"!lib/**/*.spec.*"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
+
"clean": "rimraf lib",
|
|
13
|
+
"compile": "npx tsc",
|
|
12
14
|
"test": "jest",
|
|
13
|
-
"build": "
|
|
15
|
+
"build": "npm-run-all clean compile"
|
|
14
16
|
},
|
|
15
17
|
"keywords": [
|
|
16
18
|
"express"
|
|
@@ -21,13 +23,14 @@
|
|
|
21
23
|
"express-async"
|
|
22
24
|
],
|
|
23
25
|
"dependencies": {
|
|
24
|
-
"@drunkcod/argis": "^0.0.
|
|
26
|
+
"@drunkcod/argis": "^0.0.4"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
29
|
"@jest/globals": "^29.7.0",
|
|
28
30
|
"@types/node": "^22.5.4",
|
|
29
31
|
"jest": "^29.7.0",
|
|
30
|
-
"
|
|
32
|
+
"npm-run-all": "^4.1.5",
|
|
33
|
+
"rimraf": "^6.0.1",
|
|
31
34
|
"ts-jest": "^29.2.5",
|
|
32
35
|
"typescript": "^5.5.4"
|
|
33
36
|
}
|