@api.global/typedsocket 3.1.1 → 4.1.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.
@@ -2,10 +2,11 @@ import * as typedrequest from '@api.global/typedrequest';
2
2
  import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
3
3
  export { typedrequest, typedrequestInterfaces };
4
4
  import * as isohash from '@push.rocks/isohash';
5
+ import * as smartdelay from '@push.rocks/smartdelay';
5
6
  import * as smartjson from '@push.rocks/smartjson';
7
+ import * as smartpromise from '@push.rocks/smartpromise';
6
8
  import * as smartrx from '@push.rocks/smartrx';
7
- import * as smartsocket from '@push.rocks/smartsocket';
8
9
  import * as smartstring from '@push.rocks/smartstring';
9
10
  import * as smarturl from '@push.rocks/smarturl';
10
- export { isohash, smartjson, smartrx, smartsocket, smartstring, smarturl };
11
+ export { isohash, smartdelay, smartjson, smartpromise, smartrx, smartstring, smarturl };
11
12
  export type { SmartServe, IWebSocketPeer } from '@push.rocks/smartserve';
@@ -4,10 +4,11 @@ import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
4
4
  export { typedrequest, typedrequestInterfaces };
5
5
  // @pushrocks scope
6
6
  import * as isohash from '@push.rocks/isohash';
7
+ import * as smartdelay from '@push.rocks/smartdelay';
7
8
  import * as smartjson from '@push.rocks/smartjson';
9
+ import * as smartpromise from '@push.rocks/smartpromise';
8
10
  import * as smartrx from '@push.rocks/smartrx';
9
- import * as smartsocket from '@push.rocks/smartsocket';
10
11
  import * as smartstring from '@push.rocks/smartstring';
11
12
  import * as smarturl from '@push.rocks/smarturl';
12
- export { isohash, smartjson, smartrx, smartsocket, smartstring, smarturl };
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZWRzb2NrZXQucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3R5cGVkc29ja2V0LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsbUJBQW1CO0FBQ25CLE9BQU8sS0FBSyxZQUFZLE1BQU0sMEJBQTBCLENBQUM7QUFDekQsT0FBTyxLQUFLLHNCQUFzQixNQUFNLHFDQUFxQyxDQUFDO0FBRTlFLE9BQU8sRUFBRSxZQUFZLEVBQUUsc0JBQXNCLEVBQUUsQ0FBQztBQUVoRCxtQkFBbUI7QUFDbkIsT0FBTyxLQUFLLE9BQU8sTUFBTSxxQkFBcUIsQ0FBQztBQUMvQyxPQUFPLEtBQUssU0FBUyxNQUFNLHVCQUF1QixDQUFDO0FBQ25ELE9BQU8sS0FBSyxPQUFPLE1BQU0scUJBQXFCLENBQUM7QUFDL0MsT0FBTyxLQUFLLFdBQVcsTUFBTSx5QkFBeUIsQ0FBQztBQUN2RCxPQUFPLEtBQUssV0FBVyxNQUFNLHlCQUF5QixDQUFDO0FBQ3ZELE9BQU8sS0FBSyxRQUFRLE1BQU0sc0JBQXNCLENBQUM7QUFFakQsT0FBTyxFQUFFLE9BQU8sRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFLFdBQVcsRUFBRSxXQUFXLEVBQUUsUUFBUSxFQUFFLENBQUMifQ==
13
+ export { isohash, smartdelay, smartjson, smartpromise, smartrx, smartstring, smarturl };
14
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZWRzb2NrZXQucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3R5cGVkc29ja2V0LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsbUJBQW1CO0FBQ25CLE9BQU8sS0FBSyxZQUFZLE1BQU0sMEJBQTBCLENBQUM7QUFDekQsT0FBTyxLQUFLLHNCQUFzQixNQUFNLHFDQUFxQyxDQUFDO0FBRTlFLE9BQU8sRUFBRSxZQUFZLEVBQUUsc0JBQXNCLEVBQUUsQ0FBQztBQUVoRCxtQkFBbUI7QUFDbkIsT0FBTyxLQUFLLE9BQU8sTUFBTSxxQkFBcUIsQ0FBQztBQUMvQyxPQUFPLEtBQUssVUFBVSxNQUFNLHdCQUF3QixDQUFDO0FBQ3JELE9BQU8sS0FBSyxTQUFTLE1BQU0sdUJBQXVCLENBQUM7QUFDbkQsT0FBTyxLQUFLLFlBQVksTUFBTSwwQkFBMEIsQ0FBQztBQUN6RCxPQUFPLEtBQUssT0FBTyxNQUFNLHFCQUFxQixDQUFDO0FBQy9DLE9BQU8sS0FBSyxXQUFXLE1BQU0seUJBQXlCLENBQUM7QUFDdkQsT0FBTyxLQUFLLFFBQVEsTUFBTSxzQkFBc0IsQ0FBQztBQUVqRCxPQUFPLEVBQUUsT0FBTyxFQUFFLFVBQVUsRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLE9BQU8sRUFBRSxXQUFXLEVBQUUsUUFBUSxFQUFFLENBQUMifQ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@api.global/typedsocket",
3
- "version": "3.1.1",
3
+ "version": "4.1.0",
4
4
  "private": false,
5
5
  "description": "A library for creating typed WebSocket connections, supporting bi-directional communication with type safety.",
6
6
  "main": "dist_ts/index.js",
@@ -10,31 +10,27 @@
10
10
  "license": "MIT",
11
11
  "devDependencies": {
12
12
  "@git.zone/tsbuild": "^3.1.2",
13
- "@git.zone/tsbundle": "^2.6.2",
13
+ "@git.zone/tsbundle": "^2.6.3",
14
14
  "@git.zone/tsrun": "^2.0.0",
15
15
  "@git.zone/tstest": "^3.1.3",
16
16
  "@push.rocks/smartenv": "^6.0.0",
17
- "@push.rocks/smartserve": "^1.1.0",
17
+ "@push.rocks/smartserve": "^1.1.2",
18
18
  "@push.rocks/tapbundle": "^6.0.3",
19
19
  "@types/node": "^24.10.1"
20
20
  },
21
21
  "dependencies": {
22
- "@api.global/typedrequest": "^3.1.10",
22
+ "@api.global/typedrequest": "^3.1.11",
23
23
  "@api.global/typedrequest-interfaces": "^3.0.19",
24
24
  "@push.rocks/isohash": "^2.0.1",
25
+ "@push.rocks/smartdelay": "^3.0.5",
25
26
  "@push.rocks/smartjson": "^5.2.0",
27
+ "@push.rocks/smartpromise": "^4.2.3",
26
28
  "@push.rocks/smartrx": "^3.0.10",
27
- "@push.rocks/smartsocket": "^2.1.0",
28
29
  "@push.rocks/smartstring": "^4.1.0",
29
30
  "@push.rocks/smarturl": "^3.1.0"
30
31
  },
31
32
  "peerDependencies": {
32
- "@push.rocks/smartserve": ">=1.0.0"
33
- },
34
- "peerDependenciesMeta": {
35
- "@push.rocks/smartserve": {
36
- "optional": true
37
- }
33
+ "@push.rocks/smartserve": ">=1.1.0"
38
34
  },
39
35
  "browserslist": [
40
36
  "last 1 chrome versions"
@@ -60,7 +56,7 @@
60
56
  "Networking"
61
57
  ],
62
58
  "scripts": {
63
- "test": "(tstest test/ --web)",
59
+ "test": "(tstest test/ --verbose)",
64
60
  "build": "(tsbuild --web --allowimplicitany --skiplibcheck)",
65
61
  "buildDocs": "tsdoc"
66
62
  }
package/readme.md CHANGED
@@ -13,7 +13,6 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
13
13
  - 🔌 **Auto-reconnect** - Client automatically reconnects on connection loss
14
14
  - 🏷️ **Connection Tagging** - Tag and filter connections for targeted messaging
15
15
  - 🌐 **Browser Compatible** - Works in both Node.js and browser environments
16
- - 🔗 **SmartExpress Integration** - Optional integration with existing SmartExpress servers
17
16
  - 🚀 **SmartServe Integration** - Native support for SmartServe's WebSocket handling
18
17
 
19
18
  ## Install
@@ -80,20 +79,6 @@ typedRouter.addTypedHandler<IGreetingRequest>(
80
79
  const server = await TypedSocket.createServer(typedRouter);
81
80
  ```
82
81
 
83
- #### Integration with SmartExpress
84
-
85
- If you have an existing SmartExpress server, you can attach TypedSocket to it:
86
-
87
- ```typescript
88
- import { TypedSocket } from '@api.global/typedsocket';
89
- import * as smartexpress from '@push.rocks/smartexpress';
90
-
91
- const smartExpressServer = new smartexpress.Server({ port: 8080 });
92
- await smartExpressServer.start();
93
-
94
- const server = await TypedSocket.createServer(typedRouter, smartExpressServer);
95
- ```
96
-
97
82
  #### Integration with SmartServe
98
83
 
99
84
  For SmartServe-based applications, use `fromSmartServe()` for native integration:
@@ -265,7 +250,7 @@ await server.stop();
265
250
 
266
251
  | Method | Description |
267
252
  |--------|-------------|
268
- | `createServer(router, smartExpressServer?)` | Creates a WebSocket server. Optionally attach to an existing SmartExpress server. |
253
+ | `createServer(router)` | Creates a WebSocket server (defaults to port 3000). |
269
254
  | `createClient(router, serverUrl, alias?)` | Creates a WebSocket client that connects to the specified server URL. |
270
255
  | `fromSmartServe(smartServe, router)` | Creates a TypedSocket bound to an existing SmartServe instance. |
271
256
  | `useWindowLocationOriginUrl()` | Returns the current window location origin (browser only). |
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@api.global/typedsocket',
6
- version: '3.1.1',
6
+ version: '4.1.0',
7
7
  description: 'A library for creating typed WebSocket connections, supporting bi-directional communication with type safety.'
8
8
  }