@logux/server 0.13.0 → 0.13.1
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/base-server/index.d.ts
CHANGED
|
@@ -258,7 +258,7 @@ export type SendBackActions =
|
|
|
258
258
|
* @param client Client object.
|
|
259
259
|
* @returns `true` if credentials was correct
|
|
260
260
|
*/
|
|
261
|
-
interface
|
|
261
|
+
interface ServerAuthenticator<Headers extends object> {
|
|
262
262
|
(user: AuthenticatorOptions<Headers>): boolean | Promise<boolean>
|
|
263
263
|
}
|
|
264
264
|
|
|
@@ -800,7 +800,7 @@ export class BaseServer<
|
|
|
800
800
|
*
|
|
801
801
|
* @param authenticator The authentication callback.
|
|
802
802
|
*/
|
|
803
|
-
auth(authenticator:
|
|
803
|
+
auth(authenticator: ServerAuthenticator<Headers>): void
|
|
804
804
|
|
|
805
805
|
/**
|
|
806
806
|
* Define the channel.
|
|
@@ -20,7 +20,8 @@ export function bindControlServer(app, custom) {
|
|
|
20
20
|
if (app.options.disableHttpServer) {
|
|
21
21
|
if (app.options.controlSecret) {
|
|
22
22
|
let err = new Error(
|
|
23
|
-
'`controlSecret` can not be set together
|
|
23
|
+
'`controlSecret` can not be set together ' +
|
|
24
|
+
'with `disableHttpServer` option'
|
|
24
25
|
)
|
|
25
26
|
err.logux = true
|
|
26
27
|
throw err
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logux/server",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Build own Logux server or make proxy between WebSocket and HTTP backend on any language",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"logux",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"homepage": "https://logux.org/",
|
|
19
19
|
"repository": "logux/server",
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": "^18.0.0 || ^
|
|
21
|
+
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"types": "./index.d.ts",
|
|
@@ -30,11 +30,10 @@
|
|
|
30
30
|
"@logux/actions": "^0.4.0",
|
|
31
31
|
"@logux/core": "^0.9.0",
|
|
32
32
|
"JSONStream": "^1.3.5",
|
|
33
|
-
"cookie": "^0.
|
|
33
|
+
"cookie": "^0.7.1",
|
|
34
34
|
"dotenv": "^16.4.5",
|
|
35
35
|
"fast-glob": "^3.3.2",
|
|
36
36
|
"fastq": "^1.17.1",
|
|
37
|
-
"nanodelay": "^2.0.2",
|
|
38
37
|
"nanoevents": "^9.0.0",
|
|
39
38
|
"nanoid": "^5.0.7",
|
|
40
39
|
"netmask": "^2.0.2",
|
package/test-client/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClientNode, TestPair } from '@logux/core'
|
|
2
2
|
import cookie from 'cookie'
|
|
3
|
-
import {
|
|
3
|
+
import { setTimeout } from 'node:timers/promises'
|
|
4
4
|
|
|
5
5
|
import { filterMeta } from '../filter-meta/index.js'
|
|
6
6
|
|
|
@@ -141,7 +141,7 @@ export class TestClient {
|
|
|
141
141
|
}
|
|
142
142
|
})
|
|
143
143
|
await test()
|
|
144
|
-
await
|
|
144
|
+
await setTimeout(1)
|
|
145
145
|
unbind()
|
|
146
146
|
return actions
|
|
147
147
|
}
|