@devmoods/express-extras 0.29.0 → 0.30.0
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/dist/faktory.d.ts +1 -1
- package/dist/listen.js +7 -4
- package/dist/middleware.js +1 -0
- package/package.json +6 -6
package/dist/faktory.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function createJobs({ queueName, faktory: createFactory, }: JobsO
|
|
|
8
8
|
$job: boolean;
|
|
9
9
|
jobName: string;
|
|
10
10
|
readonly executionCount: number;
|
|
11
|
-
delay(args?: Parameters<T>[0]
|
|
11
|
+
delay(args?: Parameters<T>[0]): Promise<`${string}-${string}-${string}-${string}-${string}`>;
|
|
12
12
|
execute(args: Parameters<T>[0]): Promise<any>;
|
|
13
13
|
};
|
|
14
14
|
queueName: string;
|
package/dist/listen.js
CHANGED
|
@@ -61,9 +61,9 @@ export function stoppable(server, grace = Infinity) {
|
|
|
61
61
|
}
|
|
62
62
|
server.on('connection', onConnection);
|
|
63
63
|
server.on('request', onRequest);
|
|
64
|
-
// @ts-expect-error
|
|
64
|
+
// @ts-expect-error attach stop
|
|
65
65
|
server.stop = stop;
|
|
66
|
-
// @ts-expect-error
|
|
66
|
+
// @ts-expect-error attach inspect
|
|
67
67
|
server.inspect = () => {
|
|
68
68
|
return {
|
|
69
69
|
sockets: requestsPerSocket.size,
|
|
@@ -125,8 +125,11 @@ export function createExpressServer(app, options = {}) {
|
|
|
125
125
|
return onSignal('SIGTERM');
|
|
126
126
|
},
|
|
127
127
|
get port() {
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
const address = server.address();
|
|
129
|
+
if (address == null || typeof address === 'string') {
|
|
130
|
+
throw new Error('address was a string, should not happen');
|
|
131
|
+
}
|
|
132
|
+
return address.port;
|
|
130
133
|
},
|
|
131
134
|
};
|
|
132
135
|
}
|
package/dist/middleware.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devmoods/express-extras",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "Kubernetes-ready utilities for rapid Node.js application development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@devmoods/eslint-config": "^1.12.0",
|
|
27
27
|
"@types/koa-compose": "^3.2.8",
|
|
28
|
-
"@types/node": "20.
|
|
28
|
+
"@types/node": "20.12.12",
|
|
29
29
|
"@types/supertest": "^6.0.2",
|
|
30
30
|
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
31
31
|
"@typescript-eslint/parser": "^7.1.0",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
40
40
|
"faktory-worker": "^4.5.1",
|
|
41
41
|
"prettier": "3.2.5",
|
|
42
|
-
"supertest": "
|
|
42
|
+
"supertest": "7.0.0",
|
|
43
43
|
"ts-node": "10.9.2",
|
|
44
|
-
"typescript": "5.
|
|
44
|
+
"typescript": "5.4.5",
|
|
45
45
|
"vitest": "^1.3.1"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@devmoods/fetch": "^4.0.1",
|
|
49
|
-
"@sentry/node": "^7.
|
|
49
|
+
"@sentry/node": "^7.116.0",
|
|
50
50
|
"@types/bcrypt": "^5.0.2",
|
|
51
51
|
"@types/body-parser": "^1.19.5",
|
|
52
52
|
"@types/cookie-parser": "^1.4.7",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"redis": "^4.6.13",
|
|
74
74
|
"sql-template-strings": "^2.2.2",
|
|
75
75
|
"uuid": "^9.0.1",
|
|
76
|
-
"vitest-fail-on-console": "^0.
|
|
76
|
+
"vitest-fail-on-console": "^0.7.0"
|
|
77
77
|
},
|
|
78
78
|
"prettier": {
|
|
79
79
|
"singleQuote": true
|