@dokebi/websocket 0.2.0 → 0.4.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/AI.md +144 -68
- package/README.md +86 -43
- package/dist/errors.d.ts +11 -0
- package/dist/errors.js +38 -0
- package/dist/gateway.d.ts +3 -2
- package/dist/gateway.js +487 -90
- package/dist/index.d.ts +3 -0
- package/dist/index.js +31 -19
- package/dist/options.d.ts +15 -20
- package/dist/options.js +38 -38
- package/dist/router.d.ts +3 -1
- package/dist/router.js +33 -10
- package/dist/transport.d.ts +30 -0
- package/dist/transport.js +72 -0
- package/dist/types.d.ts +108 -0
- package/dist/types.js +7 -1
- package/options.schema.json +40 -6
- package/package.json +39 -11
- package/dist/log.d.ts +0 -25
- package/dist/log.js +0 -102
package/dist/gateway.d.ts
CHANGED
|
@@ -2,15 +2,16 @@ import type { PluginContext } from '@dokebi/core';
|
|
|
2
2
|
import type { WebApi } from '@dokebi/web';
|
|
3
3
|
import type { HubApi } from '@dokebi/websocket-hub';
|
|
4
4
|
import type { Options } from './options.js';
|
|
5
|
-
import type
|
|
5
|
+
import { type SocketCodecProvider, type WebsocketApi } from './types.js';
|
|
6
6
|
export declare class Gateway {
|
|
7
7
|
#private;
|
|
8
8
|
readonly context: PluginContext;
|
|
9
9
|
readonly web: WebApi;
|
|
10
10
|
readonly hub: HubApi;
|
|
11
11
|
readonly settings: Options;
|
|
12
|
+
readonly codecs: SocketCodecProvider | undefined;
|
|
12
13
|
readonly api: WebsocketApi;
|
|
13
|
-
constructor(context: PluginContext, web: WebApi, hub: HubApi, settings: Options);
|
|
14
|
+
constructor(context: PluginContext, web: WebApi, hub: HubApi, settings: Options, codecs?: SocketCodecProvider | undefined);
|
|
14
15
|
start(): void;
|
|
15
16
|
/** Stops waiting as soon as `signal` (the core drain deadline) aborts; sockets are then cut. */
|
|
16
17
|
drain(signal: AbortSignal): Promise<void>;
|