@vonosan/ws 0.2.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.
@@ -0,0 +1,35 @@
1
+ /**
2
+ * ──────────────────────────────────────────────────────────────────
3
+ * 🏢 Company Name: Bonifade Technologies
4
+ * 👨‍💻 Developer: Bowofade Oyerinde
5
+ * 🐙 GitHub: oyenet1
6
+ * 📅 Created Date: 2026-04-05
7
+ * 🔄 Updated Date: 2026-04-05
8
+ * ──────────────────────────────────────────────────────────────────
9
+ */
10
+ export type WsRuntime = 'bun' | 'node' | 'cloudflare-workers' | 'deno';
11
+ export interface WsAdapterInfo {
12
+ /** Import path for the WebSocket adapter */
13
+ importPath: string;
14
+ /** Whether Socket.IO is supported on this runtime */
15
+ supportsSocketIo: boolean;
16
+ /** Warning message for unsupported features */
17
+ warning?: string;
18
+ }
19
+ /**
20
+ * `resolveWsAdapter(runtime)` — returns the correct WebSocket adapter import
21
+ * path for the given deployment runtime.
22
+ *
23
+ * | Runtime | Import path |
24
+ * |---------------------|----------------------------------|
25
+ * | bun | hono/bun |
26
+ * | node | @hono/node-ws |
27
+ * | cloudflare-workers | hono/cloudflare-workers |
28
+ * | deno | hono/deno |
29
+ *
30
+ * @example
31
+ * const { importPath } = resolveWsAdapter('bun')
32
+ * const { createNodeWebSocket } = await import(importPath)
33
+ */
34
+ export declare function resolveWsAdapter(runtime: string): WsAdapterInfo;
35
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,oBAAoB,GAAG,MAAM,CAAA;AAEtE,MAAM,WAAW,aAAa;IAC5B,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAA;IAClB,qDAAqD;IACrD,gBAAgB,EAAE,OAAO,CAAA;IACzB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAwD/D"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * ──────────────────────────────────────────────────────────────────
3
+ * 🏢 Company Name: Bonifade Technologies
4
+ * 👨‍💻 Developer: Bowofade Oyerinde
5
+ * 🐙 GitHub: oyenet1
6
+ * 📅 Created Date: 2026-04-05
7
+ * 🔄 Updated Date: 2026-04-05
8
+ * ──────────────────────────────────────────────────────────────────
9
+ */
10
+ import { Logger } from 'vonosan/server';
11
+ // ─── Adapter resolution ───────────────────────────────────────────────────────
12
+ /**
13
+ * `resolveWsAdapter(runtime)` — returns the correct WebSocket adapter import
14
+ * path for the given deployment runtime.
15
+ *
16
+ * | Runtime | Import path |
17
+ * |---------------------|----------------------------------|
18
+ * | bun | hono/bun |
19
+ * | node | @hono/node-ws |
20
+ * | cloudflare-workers | hono/cloudflare-workers |
21
+ * | deno | hono/deno |
22
+ *
23
+ * @example
24
+ * const { importPath } = resolveWsAdapter('bun')
25
+ * const { createNodeWebSocket } = await import(importPath)
26
+ */
27
+ export function resolveWsAdapter(runtime) {
28
+ switch (runtime) {
29
+ case 'bun':
30
+ return {
31
+ importPath: 'hono/bun',
32
+ supportsSocketIo: true,
33
+ };
34
+ case 'node':
35
+ return {
36
+ importPath: '@hono/node-ws',
37
+ supportsSocketIo: true,
38
+ };
39
+ case 'cloudflare-workers':
40
+ case 'cloudflare-pages': {
41
+ const info = {
42
+ importPath: 'hono/cloudflare-workers',
43
+ supportsSocketIo: false,
44
+ warning: '[ws] Socket.IO is not supported on Cloudflare Workers. ' +
45
+ 'Use native WebSocket via Durable Objects instead.',
46
+ };
47
+ Logger.warn(info.warning);
48
+ return info;
49
+ }
50
+ case 'deno':
51
+ return {
52
+ importPath: 'hono/deno',
53
+ supportsSocketIo: false,
54
+ warning: '[ws] Socket.IO is not supported on Deno. Use native WebSocket.',
55
+ };
56
+ case 'vercel':
57
+ case 'netlify':
58
+ case 'aws-lambda':
59
+ case 'fastly': {
60
+ const info = {
61
+ importPath: '',
62
+ supportsSocketIo: false,
63
+ warning: `[ws] WebSocket / Socket.IO is not supported on serverless target "${runtime}". ` +
64
+ 'Use a dedicated WebSocket service (e.g. Ably, Pusher) instead.',
65
+ };
66
+ Logger.warn(info.warning);
67
+ return info;
68
+ }
69
+ default:
70
+ Logger.warn('[ws] Unknown runtime, defaulting to node adapter', { runtime });
71
+ return {
72
+ importPath: '@hono/node-ws',
73
+ supportsSocketIo: true,
74
+ };
75
+ }
76
+ }
77
+ //# sourceMappingURL=adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAevC,iFAAiF;AAEjF;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,KAAK;YACR,OAAO;gBACL,UAAU,EAAE,UAAU;gBACtB,gBAAgB,EAAE,IAAI;aACvB,CAAA;QAEH,KAAK,MAAM;YACT,OAAO;gBACL,UAAU,EAAE,eAAe;gBAC3B,gBAAgB,EAAE,IAAI;aACvB,CAAA;QAEH,KAAK,oBAAoB,CAAC;QAC1B,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,MAAM,IAAI,GAAkB;gBAC1B,UAAU,EAAE,yBAAyB;gBACrC,gBAAgB,EAAE,KAAK;gBACvB,OAAO,EACL,yDAAyD;oBACzD,mDAAmD;aACtD,CAAA;YACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAQ,CAAC,CAAA;YAC1B,OAAO,IAAI,CAAA;QACb,CAAC;QAED,KAAK,MAAM;YACT,OAAO;gBACL,UAAU,EAAE,WAAW;gBACvB,gBAAgB,EAAE,KAAK;gBACvB,OAAO,EAAE,gEAAgE;aAC1E,CAAA;QAEH,KAAK,QAAQ,CAAC;QACd,KAAK,SAAS,CAAC;QACf,KAAK,YAAY,CAAC;QAClB,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,MAAM,IAAI,GAAkB;gBAC1B,UAAU,EAAE,EAAE;gBACd,gBAAgB,EAAE,KAAK;gBACvB,OAAO,EACL,qEAAqE,OAAO,KAAK;oBACjF,gEAAgE;aACnE,CAAA;YACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAQ,CAAC,CAAA;YAC1B,OAAO,IAAI,CAAA;QACb,CAAC;QAED;YACE,MAAM,CAAC,IAAI,CAAC,kDAAkD,EAAE,EAAE,OAAO,EAAE,CAAC,CAAA;YAC5E,OAAO;gBACL,UAAU,EAAE,eAAe;gBAC3B,gBAAgB,EAAE,IAAI;aACvB,CAAA;IACL,CAAC;AACH,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * ──────────────────────────────────────────────────────────────────
3
+ * 🏢 Company Name: Bonifade Technologies
4
+ * 👨‍💻 Developer: Bowofade Oyerinde
5
+ * 🐙 GitHub: oyenet1
6
+ * 📅 Created Date: 2026-04-05
7
+ * 🔄 Updated Date: 2026-04-05
8
+ * ──────────────────────────────────────────────────────────────────
9
+ */
10
+ import { ref } from 'vue';
11
+ export interface WebSocketMessage {
12
+ data: string | ArrayBuffer | Blob;
13
+ timestamp: number;
14
+ }
15
+ export interface UseWebSocketReturn {
16
+ /** Reactive list of received messages */
17
+ messages: ReturnType<typeof ref<WebSocketMessage[]>>;
18
+ /** Whether the socket is currently connected */
19
+ isConnected: ReturnType<typeof ref<boolean>>;
20
+ /** Send a message (string or object serialized to JSON) */
21
+ send: (data: string | Record<string, unknown>) => void;
22
+ /** Manually open the connection */
23
+ connect: () => void;
24
+ /** Manually close the connection */
25
+ disconnect: () => void;
26
+ }
27
+ /**
28
+ * `useWebSocket(path)` — Vue composable for reactive WebSocket connections.
29
+ *
30
+ * Features:
31
+ * - Reactive `messages` array and `isConnected` boolean
32
+ * - Auto-reconnect on close with exponential backoff (max 30s)
33
+ * - Cleans up on component unmount
34
+ *
35
+ * @example
36
+ * const { messages, isConnected, send } = useWebSocket('/ws/chat')
37
+ */
38
+ export declare function useWebSocket(path: string): UseWebSocketReturn;
39
+ //# sourceMappingURL=useWebSocket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWebSocket.d.ts","sourceRoot":"","sources":["../../src/composables/useWebSocket.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,GAAG,EAAe,MAAM,KAAK,CAAA;AAItC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,yCAAyC;IACzC,QAAQ,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAA;IACpD,gDAAgD;IAChD,WAAW,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAC5C,2DAA2D;IAC3D,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACtD,mCAAmC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,oCAAoC;IACpC,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAqF7D"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * ──────────────────────────────────────────────────────────────────
3
+ * 🏢 Company Name: Bonifade Technologies
4
+ * 👨‍💻 Developer: Bowofade Oyerinde
5
+ * 🐙 GitHub: oyenet1
6
+ * 📅 Created Date: 2026-04-05
7
+ * 🔄 Updated Date: 2026-04-05
8
+ * ──────────────────────────────────────────────────────────────────
9
+ */
10
+ import { ref, onUnmounted } from 'vue';
11
+ // ─── useWebSocket ─────────────────────────────────────────────────────────────
12
+ /**
13
+ * `useWebSocket(path)` — Vue composable for reactive WebSocket connections.
14
+ *
15
+ * Features:
16
+ * - Reactive `messages` array and `isConnected` boolean
17
+ * - Auto-reconnect on close with exponential backoff (max 30s)
18
+ * - Cleans up on component unmount
19
+ *
20
+ * @example
21
+ * const { messages, isConnected, send } = useWebSocket('/ws/chat')
22
+ */
23
+ export function useWebSocket(path) {
24
+ const messages = ref([]);
25
+ const isConnected = ref(false);
26
+ let socket = null;
27
+ let reconnectAttempts = 0;
28
+ let reconnectTimer = null;
29
+ let manualClose = false;
30
+ function buildUrl(p) {
31
+ if (typeof window === 'undefined')
32
+ return p;
33
+ const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
34
+ const host = window.location.host;
35
+ const normalised = p.startsWith('/') ? p : `/${p}`;
36
+ return `${protocol}//${host}${normalised}`;
37
+ }
38
+ function connect() {
39
+ if (typeof window === 'undefined')
40
+ return;
41
+ manualClose = false;
42
+ const url = buildUrl(path);
43
+ socket = new WebSocket(url);
44
+ socket.onopen = () => {
45
+ isConnected.value = true;
46
+ reconnectAttempts = 0;
47
+ };
48
+ socket.onmessage = (event) => {
49
+ messages.value.push({ data: event.data, timestamp: Date.now() });
50
+ };
51
+ socket.onclose = () => {
52
+ isConnected.value = false;
53
+ socket = null;
54
+ if (!manualClose) {
55
+ scheduleReconnect();
56
+ }
57
+ };
58
+ socket.onerror = () => {
59
+ // onclose fires after onerror — reconnect handled there
60
+ isConnected.value = false;
61
+ };
62
+ }
63
+ function scheduleReconnect() {
64
+ // Exponential backoff: 1s, 2s, 4s, 8s, 16s, 30s (cap)
65
+ const delay = Math.min(1000 * Math.pow(2, reconnectAttempts), 30_000);
66
+ reconnectAttempts++;
67
+ reconnectTimer = setTimeout(() => {
68
+ connect();
69
+ }, delay);
70
+ }
71
+ function disconnect() {
72
+ manualClose = true;
73
+ if (reconnectTimer !== null) {
74
+ clearTimeout(reconnectTimer);
75
+ reconnectTimer = null;
76
+ }
77
+ socket?.close();
78
+ socket = null;
79
+ isConnected.value = false;
80
+ }
81
+ function send(data) {
82
+ if (!socket || socket.readyState !== WebSocket.OPEN)
83
+ return;
84
+ const payload = typeof data === 'string' ? data : JSON.stringify(data);
85
+ socket.send(payload);
86
+ }
87
+ // Auto-connect on composable creation (client-side only)
88
+ if (typeof window !== 'undefined') {
89
+ connect();
90
+ }
91
+ // Cleanup on component unmount
92
+ onUnmounted(() => {
93
+ disconnect();
94
+ });
95
+ return { messages, isConnected, send, connect, disconnect };
96
+ }
97
+ //# sourceMappingURL=useWebSocket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWebSocket.js","sourceRoot":"","sources":["../../src/composables/useWebSocket.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * ──────────────────────────────────────────────────────────────────
3
+ * 🏢 Company Name: Bonifade Technologies
4
+ * 👨‍💻 Developer: Bowofade Oyerinde
5
+ * 🐙 GitHub: oyenet1
6
+ * 📅 Created Date: 2026-04-05
7
+ * 🔄 Updated Date: 2026-04-05
8
+ * ──────────────────────────────────────────────────────────────────
9
+ */
10
+ export { resolveWsAdapter } from './adapter.js';
11
+ export type { WsRuntime, WsAdapterInfo } from './adapter.js';
12
+ export { useWebSocket } from './composables/useWebSocket.js';
13
+ export type { WebSocketMessage, UseWebSocketReturn } from './composables/useWebSocket.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * ──────────────────────────────────────────────────────────────────
3
+ * 🏢 Company Name: Bonifade Technologies
4
+ * 👨‍💻 Developer: Bowofade Oyerinde
5
+ * 🐙 GitHub: oyenet1
6
+ * 📅 Created Date: 2026-04-05
7
+ * 🔄 Updated Date: 2026-04-05
8
+ * ──────────────────────────────────────────────────────────────────
9
+ */
10
+ export { resolveWsAdapter } from './adapter.js';
11
+ export { useWebSocket } from './composables/useWebSocket.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAG/C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@vonosan/ws",
3
+ "version": "0.2.1",
4
+ "type": "module",
5
+ "description": "Vono WebSocket module — adapter-based (native, socket.io, CF)",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/oyenet1/vonosan.git",
9
+ "directory": "packages/ws"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "main": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsc -p tsconfig.json",
27
+ "dev": "tsc -p tsconfig.json --watch"
28
+ },
29
+ "peerDependencies": {
30
+ "hono": ">=4.8.0",
31
+ "vue": ">=3.5.0",
32
+ "vonosan": ">=0.1.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/bun": "1.2.14",
36
+ "@types/node": "25.5.2",
37
+ "hono": "4.8.10",
38
+ "typescript": "5.8.3",
39
+ "vue": "3.5.13",
40
+ "vonosan": "0.2.1"
41
+ }
42
+ }