@clidey/dory 0.24.0 → 0.27.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/bin/dist/dory.js +41 -3
- package/bin/dist/dory.js.map +1 -1
- package/bin/dory.ts +44 -3
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/components/search.tsx +5 -5
- package/src/components/store.ts +1 -1
- package/src/mdx/card.tsx +7 -7
- package/src/mdx/step.tsx +6 -4
- package/src/plugins/docs-assets.ts +79 -0
- package/src/theme.scss +5 -1
- package/src/ui/header.tsx +1 -1
- package/src/ui/table-of-content.tsx +1 -1
- package/src/utils/colors.ts +1 -1
- package/src/utils/fonts.ts +1 -1
- package/vite.config.ts +6 -1
- package/dist/api-playground-demo.mdx +0 -119
- package/dist/api-reference/asyncapi.json +0 -324
- package/dist/api-reference/openapi.json +0 -366
- package/dist/api-reference/operations/create.mdx +0 -5
- package/dist/api-reference/operations/delete.mdx +0 -5
- package/dist/api-reference/operations/get.mdx +0 -5
- package/dist/api-reference/operations/update.mdx +0 -5
- package/dist/api-reference/websocket-operations/receive-chat-message.mdx +0 -5
- package/dist/api-reference/websocket-operations/receive-notifications.mdx +0 -5
- package/dist/api-reference/websocket-operations/receive-presence-update.mdx +0 -5
- package/dist/api-reference/websocket-operations/send-chat-message.mdx +0 -5
- package/dist/api-reference/websocket-operations/send-presence-update.mdx +0 -5
- package/dist/dory.json +0 -64
- package/dist/features.mdx +0 -440
- package/dist/introduction.mdx +0 -44
- package/dist/websocket-playground-demo.mdx +0 -135
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'WebSocket Playground Demo'
|
|
3
|
-
description: 'Interactive WebSocket playground for testing real-time connections'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# WebSocket Playground Demo
|
|
7
|
-
|
|
8
|
-
This page demonstrates the WebSocket playground component with various configuration options and real-time connection testing capabilities.
|
|
9
|
-
|
|
10
|
-
## Basic WebSocket Connection
|
|
11
|
-
|
|
12
|
-
<WebSocketPlayground
|
|
13
|
-
url="/ws/chat"
|
|
14
|
-
title="Basic Chat WebSocket"
|
|
15
|
-
description="Connect to a WebSocket server and send/receive messages in real-time"
|
|
16
|
-
servers={[
|
|
17
|
-
{
|
|
18
|
-
url: "wss://echo.websocket.org",
|
|
19
|
-
description: "WebSocket Echo Server"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
url: "wss://ws.postman-echo.com/raw",
|
|
23
|
-
description: "Postman Echo WebSocket"
|
|
24
|
-
}
|
|
25
|
-
]}
|
|
26
|
-
/>
|
|
27
|
-
|
|
28
|
-
## WebSocket with Subprotocols
|
|
29
|
-
|
|
30
|
-
<WebSocketPlayground
|
|
31
|
-
url="/ws/protocol"
|
|
32
|
-
title="WebSocket with Subprotocols"
|
|
33
|
-
description="WebSocket connection with custom subprotocols for specialized communication"
|
|
34
|
-
subprotocols={["chat", "v1.0"]}
|
|
35
|
-
servers={[
|
|
36
|
-
{
|
|
37
|
-
url: "wss://echo.websocket.org",
|
|
38
|
-
description: "Echo Server with Subprotocols"
|
|
39
|
-
}
|
|
40
|
-
]}
|
|
41
|
-
/>
|
|
42
|
-
|
|
43
|
-
## WebSocket with Authentication
|
|
44
|
-
|
|
45
|
-
<WebSocketPlayground
|
|
46
|
-
url="/ws/secure"
|
|
47
|
-
title="Authenticated WebSocket"
|
|
48
|
-
description="WebSocket connection with authentication headers"
|
|
49
|
-
authType="bearer"
|
|
50
|
-
headers={{
|
|
51
|
-
"User-Agent": "Dory WebSocket Client",
|
|
52
|
-
"X-Client-Version": "1.0.0"
|
|
53
|
-
}}
|
|
54
|
-
servers={[
|
|
55
|
-
{
|
|
56
|
-
url: "wss://echo.websocket.org",
|
|
57
|
-
description: "Secure Echo Server"
|
|
58
|
-
}
|
|
59
|
-
]}
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
## Real-time Chat Example
|
|
63
|
-
|
|
64
|
-
<WebSocketPlayground
|
|
65
|
-
url="/chat"
|
|
66
|
-
title="Real-time Chat"
|
|
67
|
-
description="Connect to a chat server and participate in real-time conversations"
|
|
68
|
-
subprotocols={["chat.v1", "json"]}
|
|
69
|
-
headers={{
|
|
70
|
-
"X-Client-Type": "web",
|
|
71
|
-
"X-Protocol-Version": "1.0"
|
|
72
|
-
}}
|
|
73
|
-
servers={[
|
|
74
|
-
{
|
|
75
|
-
url: "wss://echo.websocket.org",
|
|
76
|
-
description: "Chat Echo Server"
|
|
77
|
-
}
|
|
78
|
-
]}
|
|
79
|
-
/>
|
|
80
|
-
|
|
81
|
-
## Testing Instructions
|
|
82
|
-
|
|
83
|
-
1. **Connect**: Click the "Connect" button to establish a WebSocket connection
|
|
84
|
-
2. **Send Messages**: Type messages in the input field and click "Send" or press Enter
|
|
85
|
-
3. **View Messages**: All sent and received messages appear in the message history with timestamps
|
|
86
|
-
4. **Configuration**: Use the tabs to configure headers, subprotocols, and authentication
|
|
87
|
-
5. **Server Selection**: Choose different servers from the dropdown to test various endpoints
|
|
88
|
-
|
|
89
|
-
## Features
|
|
90
|
-
|
|
91
|
-
- **Real-time Connection**: Live WebSocket connection with status indicators
|
|
92
|
-
- **Message History**: View all sent/received messages with timestamps
|
|
93
|
-
- **Custom Headers**: Add authentication and custom headers
|
|
94
|
-
- **Subprotocols**: Configure WebSocket subprotocols
|
|
95
|
-
- **Multiple Servers**: Easy switching between different WebSocket endpoints
|
|
96
|
-
- **Error Handling**: Clear error messages for connection issues
|
|
97
|
-
- **Binary Support**: Handles both text and binary messages
|
|
98
|
-
|
|
99
|
-
## Message Types
|
|
100
|
-
|
|
101
|
-
The playground supports different message types:
|
|
102
|
-
- **Sent**: Messages you send (blue background)
|
|
103
|
-
- **Received**: Messages from the server (green background)
|
|
104
|
-
- **Error**: Connection or sending errors (red background)
|
|
105
|
-
- **System**: Connection status updates (gray background)
|
|
106
|
-
|
|
107
|
-
## Example Messages
|
|
108
|
-
|
|
109
|
-
Try sending these JSON messages to test structured data:
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"type": "chat",
|
|
114
|
-
"message": "Hello, WebSocket!",
|
|
115
|
-
"userId": "user123",
|
|
116
|
-
"timestamp": "2024-01-15T10:30:00Z"
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"type": "presence",
|
|
123
|
-
"status": "online",
|
|
124
|
-
"userId": "user123"
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"type": "notification",
|
|
131
|
-
"title": "Test Notification",
|
|
132
|
-
"message": "This is a test notification",
|
|
133
|
-
"level": "info"
|
|
134
|
-
}
|
|
135
|
-
```
|