iosignal-cli 3.3.0 → 4.0.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/README.ko.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # IOSignal CLI
2
- [ 한국어 | [English](README.md) ]
2
+ [ 한국어 | [English](./README.md) ]
3
3
 
4
4
  IOSignal은 웹 브라우저, Node.js 애플리케이션 및 Arduino 장치 간의 실시간 통신을 용이하게 합니다. 또한 안전한 인증 및 암호화된 통신을 제공합니다. 내장된 시그널링 프로토콜을 통해 서버는 추가 프로그래밍 없이 사용할 수 있습니다.
5
5
 
@@ -130,50 +130,6 @@ opening CongSocket Server: 8888
130
130
 
131
131
  ```
132
132
 
133
- ### 메트릭 보기
134
-
135
- - `-m 1`: 채널, 클라이언트 및 트래픽을 표시합니다.
136
- - `-m 2`: 클라이언트를 표시합니다.
137
- - `-m 3`: 채널을 표시합니다.
138
-
139
- ```sh
140
-
141
- $ ios -l 7777 -m 1
142
- ...
143
-
144
- monitor metric type: 1
145
- ┌─────────┬───────────┬───────────┬──────────┬──────────┬──────────────┐
146
- │ (index) │ rss │ heapTotal │ heapUsed │ external │ arrayBuffers │
147
- ├─────────┼───────────┼───────────┼──────────┼──────────┼──────────────┤
148
- │ 0 │ 108232704 │ 57294848 │ 24523112 │ 1389925 │ 59260 │
149
- └─────────┴───────────┴───────────┴──────────┴──────────┴──────────────┘
150
- ┌─────────┬──────────┬─────────┬──────────┬─────────┬─────────┐
151
- │ (index) │ lastSSID │ remotes │ channels │ txBytes │ rxBytes │
152
- ├─────────┼──────────┼─────────┼──────────┼─────────┼─────────┤
153
- │ 0 │ 2 │ 2 │ 1 │ 57 │ 18 │
154
- └─────────┴──────────┴─────────┴──────────┴─────────┴─────────┘
155
-
156
-
157
- $ ios -l 7777 -m 2
158
- ...
159
- monitor metric type: 2
160
- ┌─────────┬───────────────┐
161
- │ (index) │ Values │
162
- ├─────────┼───────────────┤
163
- │ 0 │ '#1:?9P-i(7)' │
164
- │ 1 │ '#2:?zNuW(7)' │
165
- └─────────┴───────────────┘
166
-
167
-
168
- $ ios -l 7777 -m 3
169
- ...
170
- monitor metric type: 3
171
- ┌─────────┬───────────────────────┐
172
- │ (index) │ Values │
173
- ├─────────┼───────────────────────┤
174
- │ 0 │ 'PRIVATE:#homeButton' │
175
- └─────────┴───────────────────────┘
176
- ```
177
133
 
178
134
  ## IOSignal 클라이언트
179
135
 
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # IOSignal CLI
2
- [ [한국어](README.ko.md) | English ]
2
+ [ [한국어](./README.ko.md) | English ]
3
3
 
4
4
  IOSignal facilitates real-time communication among web browsers, Node.js applications, and Arduino devices. It also offers secure authentication and encrypted communication. With its built-in signaling protocol, the server can be used without additional programming.
5
5
 
@@ -132,50 +132,6 @@ opening CongSocket Server: 8888
132
132
 
133
133
  ```
134
134
 
135
- ### Viewing Metrics
136
-
137
- - `-m 1`: Displays channels, clients, and traffic.
138
- - `-m 2`: Displays clients.
139
- - `-m 3`: Displays channels.
140
-
141
- ```sh
142
-
143
- $ ios -l 7777 -m 1
144
- ...
145
-
146
- monitor metric type: 1
147
- ┌─────────┬───────────┬───────────┬──────────┬──────────┬──────────────┐
148
- │ (index) │ rss │ heapTotal │ heapUsed │ external │ arrayBuffers │
149
- ├─────────┼───────────┼───────────┼──────────┼──────────┼──────────────┤
150
- │ 0 │ 108232704 │ 57294848 │ 24523112 │ 1389925 │ 59260 │
151
- └─────────┴───────────┴───────────┴──────────┴──────────┴──────────────┘
152
- ┌─────────┬──────────┬─────────┬──────────┬─────────┬─────────┐
153
- │ (index) │ lastSSID │ remotes │ channels │ txBytes │ rxBytes │
154
- ├─────────┼──────────┼─────────┼──────────┼─────────┼─────────┤
155
- │ 0 │ 2 │ 2 │ 1 │ 57 │ 18 │
156
- └─────────┴──────────┴─────────┴──────────┴─────────┴─────────┘
157
-
158
-
159
- $ ios -l 7777 -m 2
160
- ...
161
- monitor metric type: 2
162
- ┌─────────┬───────────────┐
163
- │ (index) │ Values │
164
- ├─────────┼───────────────┤
165
- │ 0 │ '#1:?9P-i(7)' │
166
- │ 1 │ '#2:?zNuW(7)' │
167
- └─────────┴───────────────┘
168
-
169
-
170
- $ ios -l 7777 -m 3
171
- ...
172
- monitor metric type: 3
173
- ┌─────────┬───────────────────────┐
174
- │ (index) │ Values │
175
- ├─────────┼───────────────────────┤
176
- │ 0 │ 'PRIVATE:#homeButton' │
177
- └─────────┴───────────────────────┘
178
- ```
179
135
 
180
136
  ## IOSignal Client
181
137
 
package/bin/io-client.js CHANGED
@@ -137,8 +137,8 @@ if (options.id && options.key) {
137
137
  }
138
138
 
139
139
 
140
- io.listen('@', (...args) => {
141
- console.log('rcv @', args)
140
+ io.listen('@', (tag, ...args) => {
141
+ console.log('CID Message: ', tag, args)
142
142
  })
143
143
 
144
144
 
@@ -205,28 +205,10 @@ io.on('iam_res', (...args) => {
205
205
  Console.Colors.Yellow)
206
206
  })
207
207
 
208
- io.on('message', (data, isBinary) => {
209
-
210
- let moreBytesIndicator = ""
211
- if (isBinary) {
212
- let buffer
213
- const displayBufferLimit = 20
214
- if (data.byteLength > displayBufferLimit) {
215
- buffer = Buffer.from(data, 0, displayBufferLimit);
216
- moreBytesIndicator = "..."
217
- } else {
218
- buffer = Buffer.from(data);
219
- }
220
-
221
- let prn = `${buffer.toString('hex')}${moreBytesIndicator} [${data.byteLength} bytes total]`;
222
- if (wsConsole.showIncommingMessage) wsConsole.print(Console.Types.Incoming, `rx: bin [hex] ${prn}`, Console.Colors.Green)
223
-
224
- } else {
225
- if (wsConsole.showIncommingMessage) wsConsole.print(Console.Types.Incoming, `rx: text: ${data}`, Console.Colors.Green)
226
- }
208
+ io.on('message',(tag,...args)=>{
209
+ wsConsole.print(Console.Types.Incoming, `message: ${tag} ${args}`, Console.Colors.Green)
227
210
  })
228
211
 
229
- // to send frame message.
230
212
  wsConsole.on('line', (data) => {
231
213
  if (data[0] === '.') {
232
214
  const toks = data.split(/\s+/)
@@ -346,12 +328,13 @@ wsConsole.on('line', (data) => {
346
328
  case 'listen':
347
329
  toks.shift()
348
330
  let tag = toks[0]
349
- console.log('listen tag', tag)
350
- io.listen(tag, (...args) => {
351
- console.log(`subscribe & listen tag: ${tag} args:`, args)
331
+ io.subscribe( tag )
332
+ console.log('subscribe tag', tag)
333
+ // io.listen(tag, (tag, ...args) => {
334
+ // console.log(`subscribe & listen tag: ${tag} args:`, args)
352
335
 
353
- })
354
- io.subscribe_memory_channels()
336
+ // })
337
+ // io.subscribe_memory_channels()
355
338
  break;
356
339
 
357
340
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iosignal-cli",
3
- "version": "3.3.0",
3
+ "version": "4.0.0",
4
4
  "description": "IOSignal server and client CLI program.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "boxen": "8.0.1",
22
22
  "chalk": "5.6.2",
23
23
  "commander": "13.1.0",
24
- "iosignal": "^3.3.0",
24
+ "iosignal": "^4.0.0",
25
25
  "redis": "4.7.1"
26
26
  },
27
27
  "repository": {