@socket-mesh/client 18.1.3 → 18.1.5

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.
@@ -1,22 +1,20 @@
1
- import { ChannelDetails, Channels, ChannelsOptions } from "@socket-mesh/channels";
1
+ import { ChannelDetails, ChannelMap, Channels, ChannelsOptions } from "@socket-mesh/channels";
2
2
  import { ClientTransport } from "./client-transport.js";
3
- import { ClientMap } from "./maps/client-map.js";
3
+ import { MethodMap, PrivateMethodMap, PublicMethodMap, ServiceMap } from "@socket-mesh/core";
4
4
  export interface ClientChannelsOptions extends ChannelsOptions {
5
5
  autoSubscribeOnConnect?: boolean;
6
6
  }
7
- export declare class ClientChannels<T extends ClientMap> extends Channels<T['Channel']> {
7
+ export declare class ClientChannels<TChannel extends ChannelMap, TIncoming extends MethodMap, TService extends ServiceMap, TOutgoing extends PublicMethodMap, TPrivateOutgoing extends PrivateMethodMap, TState extends object> extends Channels<TChannel> {
8
8
  autoSubscribeOnConnect: boolean;
9
- protected readonly _transport: ClientTransport<T>;
9
+ protected readonly _transport: ClientTransport<TIncoming, TService, TOutgoing, TPrivateOutgoing, TState>;
10
10
  protected _preparingPendingSubscriptions: boolean;
11
- constructor(transport: ClientTransport<T>, options?: ClientChannelsOptions);
11
+ constructor(transport: ClientTransport<TIncoming, TService, TOutgoing, TPrivateOutgoing, TState>, options?: ClientChannelsOptions);
12
12
  private suspendSubscriptions;
13
13
  protected trySubscribe(channel: ChannelDetails): void;
14
14
  private processPendingSubscriptions;
15
- unsubscribe(channelName: keyof T['Channel'] & string | string): void;
15
+ unsubscribe(channelName: keyof TChannel & string): void;
16
16
  protected tryUnsubscribe(channel: ChannelDetails): void;
17
17
  private triggerChannelSubscribeFail;
18
- transmitPublish<U extends keyof T['Channel'] & string>(channelName: U, data: T['Channel'][U]): Promise<void>;
19
- transmitPublish<U>(channelName: string, data: U): Promise<void>;
20
- invokePublish<U extends keyof T['Channel'] & string>(channelName: keyof T['Channel'] & string, data: T['Channel'][U]): Promise<void>;
21
- invokePublish<U>(channelName: string, data: U): Promise<void>;
18
+ transmitPublish<U extends keyof TChannel & string>(channelName: U, data: TChannel[U]): Promise<void>;
19
+ invokePublish<U extends keyof TChannel & string>(channelName: keyof TChannel & string, data: TChannel[U]): Promise<void>;
22
20
  }
@@ -1,8 +1,8 @@
1
1
  import ws from "isomorphic-ws";
2
- import { SocketOptions } from "@socket-mesh/core";
2
+ import { MethodMap, PrivateMethodMap, PublicMethodMap, ServiceMap, SocketOptions } from "@socket-mesh/core";
3
3
  import { ClientAuthEngine, LocalStorageAuthEngineOptions } from "./client-auth-engine.js";
4
- import { SocketMapFromClient } from "./maps/socket-map.js";
5
- import { ClientMap } from "./maps/client-map.js";
4
+ import { ClientPrivateMap } from "./maps/client-map.js";
5
+ import { ServerPrivateMap } from "./maps/server-map.js";
6
6
  export interface AutoReconnectOptions {
7
7
  initialDelay: number;
8
8
  randomness: number;
@@ -14,11 +14,11 @@ export interface ConnectOptions {
14
14
  connectTimeoutMs?: number;
15
15
  wsOptions?: ws.ClientOptions;
16
16
  }
17
- export interface ClientSocketOptions<T extends ClientMap> extends SocketOptions<SocketMapFromClient<T>>, ConnectOptions {
17
+ export interface ClientSocketOptions<TOutgoing extends PublicMethodMap = {}, TService extends ServiceMap = {}, TIncoming extends MethodMap = {}, TPrivateOutgoing extends PrivateMethodMap = {}, TState extends object = {}> extends SocketOptions<TIncoming & ClientPrivateMap, TOutgoing, TPrivateOutgoing & ServerPrivateMap, TService, TState>, ConnectOptions {
18
18
  autoConnect?: boolean;
19
19
  authEngine?: ClientAuthEngine | LocalStorageAuthEngineOptions | null;
20
20
  autoReconnect?: Partial<AutoReconnectOptions> | boolean;
21
21
  autoSubscribeOnConnect?: boolean;
22
22
  channelPrefix?: string;
23
23
  }
24
- export declare function parseClientOptions<T extends ClientMap>(options: ClientSocketOptions<T> | string | URL): ClientSocketOptions<T>;
24
+ export declare function parseClientOptions<TIncoming extends MethodMap, TService extends ServiceMap, TOutgoing extends PublicMethodMap, TPrivateOutgoing extends PrivateMethodMap, TState extends object>(options: ClientSocketOptions<TOutgoing, TService, TIncoming, TPrivateOutgoing, TState> | string | URL): ClientSocketOptions<TOutgoing, TService, TIncoming, TPrivateOutgoing, TState>;
@@ -1,14 +1,15 @@
1
1
  import { AutoReconnectOptions, ClientSocketOptions, ConnectOptions } from "./client-socket-options.js";
2
2
  import { SignedAuthToken } from "@socket-mesh/auth";
3
- import { Socket } from "@socket-mesh/core";
3
+ import { MethodMap, PrivateMethodMap, PublicMethodMap, ServiceMap, Socket } from "@socket-mesh/core";
4
4
  import { ClientChannels } from "./client-channels.js";
5
- import { SocketMapFromClient } from "./maps/socket-map.js";
6
- import { ClientMap } from "./maps/client-map.js";
7
- export declare class ClientSocket<T extends ClientMap> extends Socket<SocketMapFromClient<T>> {
5
+ import { ClientPrivateMap } from "./maps/client-map.js";
6
+ import { ChannelMap } from "@socket-mesh/channels";
7
+ import { ServerPrivateMap } from "./maps/server-map.js";
8
+ export declare class ClientSocket<TOutgoing extends PublicMethodMap = {}, TChannel extends ChannelMap = ChannelMap, TService extends ServiceMap = {}, TState extends object = {}, TIncoming extends MethodMap = {}, TPrivateOutgoing extends PrivateMethodMap = {}> extends Socket<TIncoming & ClientPrivateMap, TOutgoing, TPrivateOutgoing & ServerPrivateMap, TService, TState> {
8
9
  private readonly _clientTransport;
9
- readonly channels: ClientChannels<T>;
10
+ readonly channels: ClientChannels<TChannel, TIncoming, TService, TOutgoing, TPrivateOutgoing, TState>;
10
11
  constructor(address: string | URL);
11
- constructor(options: ClientSocketOptions<T>);
12
+ constructor(options: ClientSocketOptions<TOutgoing, TService, TIncoming, TPrivateOutgoing, TState>);
12
13
  authenticate(signedAuthToken: SignedAuthToken): Promise<void>;
13
14
  get autoReconnect(): AutoReconnectOptions | false;
14
15
  set autoReconnect(value: Partial<AutoReconnectOptions> | boolean);
@@ -1,12 +1,11 @@
1
- import { FunctionReturnType, InvokeMethodOptions, InvokeServiceOptions, SocketTransport, SocketStatus } from "@socket-mesh/core";
1
+ import { FunctionReturnType, InvokeMethodOptions, InvokeServiceOptions, SocketTransport, SocketStatus, MethodMap, ServiceMap, PublicMethodMap, PrivateMethodMap } from "@socket-mesh/core";
2
2
  import ws from "isomorphic-ws";
3
3
  import { ClientAuthEngine } from "./client-auth-engine.js";
4
4
  import { ServerPrivateMap } from "./maps/server-map.js";
5
5
  import { AutoReconnectOptions, ClientSocketOptions, ConnectOptions } from "./client-socket-options.js";
6
6
  import { AuthToken } from "@socket-mesh/auth";
7
- import { SocketMapFromClient } from "./maps/socket-map.js";
8
- import { ClientMap } from "./maps/client-map.js";
9
- export declare class ClientTransport<T extends ClientMap> extends SocketTransport<SocketMapFromClient<T>> {
7
+ import { ClientPrivateMap } from "./maps/client-map.js";
8
+ export declare class ClientTransport<TIncoming extends MethodMap, TService extends ServiceMap, TOutgoing extends PublicMethodMap, TPrivateOutgoing extends PrivateMethodMap, TState extends object> extends SocketTransport<TIncoming & ClientPrivateMap, TOutgoing, TPrivateOutgoing & ServerPrivateMap, TService, TState> {
10
9
  readonly authEngine: ClientAuthEngine;
11
10
  private _uri;
12
11
  private _wsOptions;
@@ -17,7 +16,7 @@ export declare class ClientTransport<T extends ClientMap> extends SocketTranspor
17
16
  private _pendingReconnectTimeout;
18
17
  private _pingTimeoutMs;
19
18
  isPingTimeoutDisabled: boolean;
20
- constructor(options: ClientSocketOptions<T>);
19
+ constructor(options: ClientSocketOptions<TOutgoing, TService, TIncoming, TPrivateOutgoing, TState>);
21
20
  get autoReconnect(): AutoReconnectOptions | false;
22
21
  set autoReconnect(value: Partial<AutoReconnectOptions> | boolean);
23
22
  connect(options?: ConnectOptions): void;
@@ -40,13 +39,13 @@ export declare class ClientTransport<T extends ClientMap> extends SocketTranspor
40
39
  get uri(): URL;
41
40
  protected get webSocket(): ws.WebSocket | null;
42
41
  protected set webSocket(value: ws.WebSocket | null);
43
- transmit<TMethod extends keyof SocketMapFromClient<T>['Outgoing']>(method: TMethod, arg?: Parameters<SocketMapFromClient<T>['Outgoing'][TMethod]>[0]): Promise<void>;
44
- transmit<TService extends keyof SocketMapFromClient<T>['Service'], TMethod extends keyof SocketMapFromClient<T>['Service'][TService]>(options: [TService, TMethod], arg?: Parameters<SocketMapFromClient<T>['Service'][TService][TMethod]>[0]): Promise<void>;
45
- transmit<TMethod extends keyof (SocketMapFromClient<T>['PrivateOutgoing'] & ServerPrivateMap)>(method: TMethod, arg?: Parameters<(SocketMapFromClient<T>['PrivateOutgoing'] & ServerPrivateMap)[TMethod]>[0]): Promise<void>;
46
- invoke<TMethod extends keyof SocketMapFromClient<T>['Outgoing']>(method: TMethod, arg?: Parameters<SocketMapFromClient<T>['Outgoing'][TMethod]>[0]): [Promise<FunctionReturnType<SocketMapFromClient<T>['Outgoing'][TMethod]>>, () => void];
47
- invoke<TService extends keyof SocketMapFromClient<T>['Service'], TMethod extends keyof SocketMapFromClient<T>['Service'][TService]>(options: [TService, TMethod, (number | false)?], arg?: Parameters<SocketMapFromClient<T>['Service'][TService][TMethod]>[0]): [Promise<FunctionReturnType<SocketMapFromClient<T>['Service'][TService][TMethod]>>, () => void];
48
- invoke<TService extends keyof SocketMapFromClient<T>['Service'], TMethod extends keyof SocketMapFromClient<T>['Service'][TService]>(options: InvokeServiceOptions<SocketMapFromClient<T>['Service'], TService, TMethod>, arg?: Parameters<SocketMapFromClient<T>['Service'][TService][TMethod]>[0]): [Promise<FunctionReturnType<SocketMapFromClient<T>['Service'][TService][TMethod]>>, () => void];
49
- invoke<TMethod extends keyof SocketMapFromClient<T>['Outgoing']>(options: InvokeMethodOptions<SocketMapFromClient<T>['Outgoing'], TMethod>, arg?: Parameters<SocketMapFromClient<T>['Outgoing'][TMethod]>[0]): [Promise<FunctionReturnType<SocketMapFromClient<T>['Outgoing'][TMethod]>>, () => void];
50
- invoke<TMethod extends keyof (SocketMapFromClient<T>['PrivateOutgoing'] & ServerPrivateMap)>(method: TMethod, arg: Parameters<(SocketMapFromClient<T>['PrivateOutgoing'] & ServerPrivateMap)[TMethod]>[0]): [Promise<FunctionReturnType<(SocketMapFromClient<T>['PrivateOutgoing'] & ServerPrivateMap)[TMethod]>>, () => void];
51
- invoke<TMethod extends keyof (SocketMapFromClient<T>['PrivateOutgoing'] & ServerPrivateMap)>(options: InvokeMethodOptions<(SocketMapFromClient<T>['PrivateOutgoing'] & ServerPrivateMap), TMethod>, arg?: Parameters<(SocketMapFromClient<T>['PrivateOutgoing'] & ServerPrivateMap)[TMethod]>[0]): [Promise<FunctionReturnType<(SocketMapFromClient<T>['PrivateOutgoing'] & ServerPrivateMap)[TMethod]>>, () => void];
42
+ transmit<TMethod extends keyof TOutgoing>(method: TMethod, arg?: Parameters<TOutgoing[TMethod]>[0]): Promise<void>;
43
+ transmit<TServiceName extends keyof TService, TMethod extends keyof TService[TServiceName]>(options: [TServiceName, TMethod], arg?: Parameters<TService[TServiceName][TMethod]>[0]): Promise<void>;
44
+ transmit<TMethod extends keyof (TPrivateOutgoing & ServerPrivateMap)>(method: TMethod, arg?: Parameters<(TPrivateOutgoing & ServerPrivateMap)[TMethod]>[0]): Promise<void>;
45
+ invoke<TMethod extends keyof TOutgoing>(method: TMethod, arg?: Parameters<TOutgoing[TMethod]>[0]): [Promise<FunctionReturnType<TOutgoing[TMethod]>>, () => void];
46
+ invoke<TServiceName extends keyof TService, TMethod extends keyof TService[TServiceName]>(options: [TServiceName, TMethod, (number | false)?], arg?: Parameters<TService[TServiceName][TMethod]>[0]): [Promise<FunctionReturnType<TService[TServiceName][TMethod]>>, () => void];
47
+ invoke<TServiceName extends keyof TService, TMethod extends keyof TService[TServiceName]>(options: InvokeServiceOptions<TService, TServiceName, TMethod>, arg?: Parameters<TService[TServiceName][TMethod]>[0]): [Promise<FunctionReturnType<TService[TServiceName][TMethod]>>, () => void];
48
+ invoke<TMethod extends keyof TOutgoing>(options: InvokeMethodOptions<TOutgoing, TMethod>, arg?: Parameters<TOutgoing[TMethod]>[0]): [Promise<FunctionReturnType<TOutgoing[TMethod]>>, () => void];
49
+ invoke<TMethod extends keyof (TPrivateOutgoing & ServerPrivateMap)>(method: TMethod, arg: Parameters<(TPrivateOutgoing & ServerPrivateMap)[TMethod]>[0]): [Promise<FunctionReturnType<(TPrivateOutgoing & ServerPrivateMap)[TMethod]>>, () => void];
50
+ invoke<TMethod extends keyof (TPrivateOutgoing & ServerPrivateMap)>(options: InvokeMethodOptions<(TPrivateOutgoing & ServerPrivateMap), TMethod>, arg?: Parameters<(TPrivateOutgoing & ServerPrivateMap)[TMethod]>[0]): [Promise<FunctionReturnType<(TPrivateOutgoing & ServerPrivateMap)[TMethod]>>, () => void];
52
51
  }
@@ -1,6 +1,7 @@
1
1
  import { RequestHandlerArgs } from "@socket-mesh/core";
2
2
  import { ClientSocket } from "../client-socket.js";
3
3
  import { ClientTransport } from "../client-transport.js";
4
- import { ClientMap, KickOutOptions } from "../maps/client-map.js";
5
- import { BasicSocketMapClient } from "../maps/socket-map.js";
6
- export declare function kickOutHandler({ socket, options }: RequestHandlerArgs<KickOutOptions, BasicSocketMapClient, ClientSocket<ClientMap>, ClientTransport<ClientMap>>): Promise<void>;
4
+ import { ClientPrivateMap, KickOutOptions } from "../maps/client-map.js";
5
+ import { ServerPrivateMap } from "../maps/server-map.js";
6
+ import { ChannelMap } from "@socket-mesh/channels";
7
+ export declare function kickOutHandler({ socket, options }: RequestHandlerArgs<KickOutOptions, ClientPrivateMap, {}, ServerPrivateMap, {}, {}, ClientSocket<{}, ChannelMap>, ClientTransport<{}, {}, {}, {}, {}>>): Promise<void>;
@@ -1,7 +1,7 @@
1
- import { PublishOptions } from "@socket-mesh/channels";
1
+ import { ChannelMap, PublishOptions } from "@socket-mesh/channels";
2
2
  import { RequestHandlerArgs } from "@socket-mesh/core";
3
3
  import { ClientSocket } from "../client-socket.js";
4
4
  import { ClientTransport } from "../client-transport.js";
5
- import { ClientMap } from "../maps/client-map.js";
6
- import { BasicSocketMapClient } from "../maps/socket-map.js";
7
- export declare function publishHandler({ socket, options }: RequestHandlerArgs<PublishOptions, BasicSocketMapClient, ClientSocket<ClientMap>, ClientTransport<ClientMap>>): Promise<void>;
5
+ import { ClientPrivateMap } from "../maps/client-map.js";
6
+ import { ServerPrivateMap } from "../maps/server-map.js";
7
+ export declare function publishHandler({ socket, options }: RequestHandlerArgs<PublishOptions, ClientPrivateMap, {}, ServerPrivateMap, {}, {}, ClientSocket<{}, ChannelMap>, ClientTransport<{}, {}, {}, {}, {}>>): Promise<void>;
@@ -1,14 +1,5 @@
1
1
  import { SignedAuthToken } from "@socket-mesh/auth";
2
- import { ChannelMap, PublishOptions } from "@socket-mesh/channels";
3
- import { MethodMap, PrivateMethodMap, PublicMethodMap, ServiceMap } from "@socket-mesh/core";
4
- export interface ClientMap {
5
- Channel: ChannelMap;
6
- Incoming: MethodMap;
7
- Service: ServiceMap;
8
- Outgoing: PublicMethodMap;
9
- PrivateOutgoing: PrivateMethodMap;
10
- State: object;
11
- }
2
+ import { PublishOptions } from "@socket-mesh/channels";
12
3
  export interface KickOutOptions {
13
4
  channel: string;
14
5
  message: string;
@@ -1,3 +1,2 @@
1
1
  export * from "./client-map.js";
2
2
  export * from "./server-map.js";
3
- export * from "./socket-map.js";
@@ -1,3 +1,2 @@
1
1
  export * from "./client-map.js";
2
2
  export * from "./server-map.js";
3
- export * from "./socket-map.js";
@@ -1,10 +1,10 @@
1
- import { EmptySocketMap, SocketMap } from "@socket-mesh/core";
1
+ import { MethodMap, PrivateMethodMap, PublicMethodMap, ServiceMap } from "@socket-mesh/core";
2
2
  import { Plugin, SendRequestPluginArgs, SendResponsePluginArgs } from "@socket-mesh/core";
3
3
  export interface BatchingPluginOptions {
4
4
  batchOnHandshakeDuration?: number | false;
5
5
  batchInterval?: number;
6
6
  }
7
- export declare abstract class BatchingPlugin<T extends SocketMap = EmptySocketMap> implements Plugin<T> {
7
+ export declare abstract class BatchingPlugin<TIncoming extends MethodMap, TOutgoing extends PublicMethodMap, TPrivateOutgoing extends PrivateMethodMap, TService extends ServiceMap, TState extends object> implements Plugin<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState> {
8
8
  batchOnHandshakeDuration: number | boolean;
9
9
  batchInterval: number;
10
10
  private _batchingIntervalId;
@@ -22,20 +22,20 @@ export declare abstract class BatchingPlugin<T extends SocketMap = EmptySocketMa
22
22
  stopBatching(): void;
23
23
  private stop;
24
24
  }
25
- export declare class RequestBatchingPlugin<T extends SocketMap = EmptySocketMap> extends BatchingPlugin<T> {
25
+ export declare class RequestBatchingPlugin<TIncoming extends MethodMap, TOutgoing extends PublicMethodMap, TPrivateOutgoing extends PrivateMethodMap, TService extends ServiceMap, TState extends object> extends BatchingPlugin<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState> {
26
26
  private _requests;
27
27
  private _continue;
28
28
  constructor(options?: BatchingPluginOptions);
29
29
  cancelBatching(): void;
30
30
  protected flush(): void;
31
- sendRequest({ requests, cont }: SendRequestPluginArgs<T>): void;
31
+ sendRequest({ requests, cont }: SendRequestPluginArgs<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState>): void;
32
32
  type: 'requestBatching';
33
33
  }
34
- export declare class ResponseBatchingPlugin<T extends SocketMap = EmptySocketMap> extends BatchingPlugin<T> {
34
+ export declare class ResponseBatchingPlugin<TIncoming extends MethodMap, TOutgoing extends PublicMethodMap, TPrivateOutgoing extends PrivateMethodMap, TService extends ServiceMap, TState extends object> extends BatchingPlugin<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState> {
35
35
  private _responses;
36
36
  private _continue;
37
37
  constructor(options?: BatchingPluginOptions);
38
38
  protected flush(): void;
39
- sendResponse({ responses, cont }: SendResponsePluginArgs<T>): void;
39
+ sendResponse({ responses, cont }: SendResponsePluginArgs<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState>): void;
40
40
  type: 'responseBatching';
41
41
  }
@@ -1,10 +1,10 @@
1
1
  import { RawData } from "ws";
2
- import { EmptySocketMap, MessageRawPluginArgs, Plugin, PluginArgs, SocketMap } from "@socket-mesh/core";
3
- export declare class InOrderPlugin<T extends SocketMap = EmptySocketMap> implements Plugin<T> {
2
+ import { MessageRawPluginArgs, MethodMap, Plugin, PluginArgs, PrivateMethodMap, PublicMethodMap, ServiceMap } from "@socket-mesh/core";
3
+ export declare class InOrderPlugin<TIncoming extends MethodMap, TOutgoing extends PublicMethodMap, TPrivateOutgoing extends PrivateMethodMap, TService extends ServiceMap, TState extends object> implements Plugin<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState> {
4
4
  type: 'inOrder';
5
5
  private readonly _inboundMessageStream;
6
6
  constructor();
7
7
  handleInboundMessageStream(): void;
8
- onEnd({ transport }: PluginArgs<T>): void;
9
- onMessageRaw(options: MessageRawPluginArgs<T>): Promise<string | RawData>;
8
+ onEnd({ transport }: PluginArgs<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState>): void;
9
+ onMessageRaw(options: MessageRawPluginArgs<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState>): Promise<string | RawData>;
10
10
  }
@@ -1,11 +1,11 @@
1
- import { EmptySocketMap, Plugin, SendRequestPluginArgs, SocketMap } from "@socket-mesh/core";
2
- export declare class OfflinePlugin<T extends SocketMap = EmptySocketMap> implements Plugin<T> {
1
+ import { MethodMap, Plugin, PrivateMethodMap, PublicMethodMap, SendRequestPluginArgs, ServiceMap } from "@socket-mesh/core";
2
+ export declare class OfflinePlugin<TIncoming extends MethodMap, TOutgoing extends PublicMethodMap, TPrivateOutgoing extends PrivateMethodMap, TService extends ServiceMap, TState extends object> implements Plugin<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState> {
3
3
  private _isReady;
4
4
  private _requests;
5
5
  private _continue;
6
6
  constructor();
7
7
  type: "offline";
8
- sendRequest({ requests, cont }: SendRequestPluginArgs<T>): void;
8
+ sendRequest({ requests, cont }: SendRequestPluginArgs<TIncoming, TOutgoing, TPrivateOutgoing, TService, TState>): void;
9
9
  onReady(): void;
10
10
  onClose(): void;
11
11
  onDisconnected(): void;
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "name": "@socket-mesh/client",
3
3
  "description": "A TCP socket pair for easily transmitting full messages without worrying about request size limits.",
4
- "version": "18.1.3",
5
- "type": "module",
6
- "main": "dist/index.js",
4
+ "version": "18.1.5",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": ["./dist"],
9
- "browser": {
10
- "ws": "./lib/ws-browser.js"
11
- },
9
+ "browser": {
10
+ "ws": "./lib/ws-browser.js"
11
+ },
12
12
  "author": {
13
13
  "name": "Greg Kimmy"
14
14
  },
15
15
  "scripts": {
16
- "build": "node ../../scripts/build.mjs && tsc --project tsconfig.build.json",
16
+ "build": "node ../../scripts/build.mjs && tsc --project tsconfig.build.json",
17
17
  "bundle": "rollup --config ./rollup.config.js",
18
- "deploy": "npm run build && node ../../scripts/publish.mjs",
18
+ "deploy": "npm run build && node ../../scripts/publish.mjs",
19
19
  "test": "cross-env node --test --import=./run-test.js test/client-test.ts"
20
20
  },
21
- "repository": {
22
- "type": "git",
23
- "url": "git+https://github.com/socket-mesh/client-server.git"
24
- },
25
- "bugs": {
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/socket-mesh/client-server.git"
24
+ },
25
+ "bugs": {
26
26
  "url": "https://github.com/socket-mesh/client-server/labels/client"
27
- },
27
+ },
28
28
  "devDependencies": {
29
29
  "@kineticcafe/rollup-plugin-delete": "^3.0.0",
30
30
  "@rollup/plugin-alias": "^5.1.0",
@@ -38,18 +38,18 @@
38
38
  "@types/jsonwebtoken": "^9.0.6",
39
39
  "@types/ws": "^8.5.10",
40
40
  "jsonwebtoken": "^9.0.2",
41
- "rollup": "^4.18.1",
41
+ "rollup": "^4.22.5",
42
42
  "rollup-plugin-dts": "^6.1.1",
43
- "tslib": "^2.6.3"
43
+ "tslib": "^2.7.0"
44
44
  },
45
45
  "dependencies": {
46
46
  "@socket-mesh/async-stream-emitter": "^7.1.2",
47
47
  "@socket-mesh/auth": "^2.2.0",
48
- "@socket-mesh/channels": "^6.1.1",
49
- "@socket-mesh/core": "^1.0.2",
48
+ "@socket-mesh/channels": "^6.1.2",
49
+ "@socket-mesh/core": "^1.0.3",
50
50
  "@socket-mesh/errors": "^3.2.0",
51
51
  "@socket-mesh/formatter": "^4.1.0",
52
- "buffer": "^5.2.1",
52
+ "buffer": "^6.0.3",
53
53
  "events": "^3.3.0",
54
54
  "isomorphic-ws": "^5.0.0",
55
55
  "ws": "^8.18.0"
@@ -1,17 +0,0 @@
1
- import { ClientMap, ClientPrivateMap } from "./client-map.js";
2
- import { PublicMethodMap } from "@socket-mesh/core";
3
- import { ServerPrivateMap } from "./server-map.js";
4
- export interface SocketMapFromClient<T extends ClientMap> {
5
- Incoming: T['Incoming'] & ClientPrivateMap;
6
- Service: T['Service'];
7
- Outgoing: T['Outgoing'];
8
- PrivateOutgoing: T['PrivateOutgoing'] & ServerPrivateMap;
9
- State: T['State'];
10
- }
11
- export interface BasicSocketMapClient<TOutgoing extends PublicMethodMap = {}, TState extends object = {}> {
12
- Incoming: ClientPrivateMap;
13
- Service: {};
14
- Outgoing: TOutgoing;
15
- PrivateOutgoing: ServerPrivateMap;
16
- State: TState;
17
- }
@@ -1 +0,0 @@
1
- export {};