iosignal 5.3.0 → 6.1.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.
- package/dist/browser/esm/io.d.ts +14 -4
- package/dist/browser/esm/io.js +4 -4
- package/dist/browser/esm/io.js.map +1 -1
- package/dist/browser/iife/io.js +4 -4
- package/dist/browser/iife/io.js.map +1 -1
- package/dist/node/iosignal.cjs +149 -470
- package/dist/node/iosignal.js +148 -469
- package/dist/types/client/IOCore.d.ts +14 -4
- package/package.json +2 -2
|
@@ -37,6 +37,7 @@ export class IOCore {
|
|
|
37
37
|
* @type {string}
|
|
38
38
|
*/
|
|
39
39
|
stateName: string;
|
|
40
|
+
_stateRevision: number;
|
|
40
41
|
/**
|
|
41
42
|
* Transmitted message counter.
|
|
42
43
|
* @type {number}
|
|
@@ -319,8 +320,8 @@ export class IOCore {
|
|
|
319
320
|
*/
|
|
320
321
|
subscribe(tag: string): void;
|
|
321
322
|
/**
|
|
322
|
-
*
|
|
323
|
-
*
|
|
323
|
+
* Sends subscriptions stored by listen()/link() on each CID-ready transition,
|
|
324
|
+
* including reconnection. This automates subscription setup for simple clients.
|
|
324
325
|
*/
|
|
325
326
|
subscribe_channels(): void;
|
|
326
327
|
/**
|
|
@@ -330,7 +331,13 @@ export class IOCore {
|
|
|
330
331
|
*/
|
|
331
332
|
unsubscribe(tag?: string): void;
|
|
332
333
|
/**
|
|
333
|
-
*
|
|
334
|
+
* Convenience API for simple clients (for example, CLI tools): register a
|
|
335
|
+
* tag handler once and remember its subscription in channels. Register before
|
|
336
|
+
* connection readiness; the CID-ready flow subscribes on initial connection
|
|
337
|
+
* and again after reconnect, without application-level ready/subscribe code.
|
|
338
|
+
* This does not send a subscription immediately, even if already ready.
|
|
339
|
+
* For precise subscription/send ordering or dynamic subscriptions, use
|
|
340
|
+
* on() with subscribe() in a ready handler instead. Direct signals use on('@').
|
|
334
341
|
* @param {string} tag - The tag to listen on.
|
|
335
342
|
* @param {Function} handler - The callback function to handle the signal.
|
|
336
343
|
* @throws {TypeError} If tag is not a string, handler is not a function, or tag length is invalid.
|
|
@@ -398,8 +405,11 @@ export class IOCore {
|
|
|
398
405
|
* 1. 상태가 변경 될 때만 'change' 이벤트 호출된다.
|
|
399
406
|
* 2. emitEventAndMessage 옵션 값이 지정되야 해당 이벤트 이름이 호출된다.
|
|
400
407
|
* 보통 이벤트 이름과 동일하게 적거나 이벤트 상황 안내문을 넣는다.
|
|
408
|
+
* 3. 두 상태값 갱신 후 change, 개별 이벤트 순서로 호출한다.
|
|
409
|
+
* 콜백에서 다른 상태로 전이하면 이전 상태의 개별 이벤트는 생략한다.
|
|
410
|
+
* @returns {boolean} Whether this transition is still current after callbacks.
|
|
401
411
|
*/
|
|
402
|
-
stateChange(state: string, emitEventAndMessage?: string):
|
|
412
|
+
stateChange(state: string, emitEventAndMessage?: string): boolean;
|
|
403
413
|
}
|
|
404
414
|
export type MBP = import("meta-buffer-pack").MBP;
|
|
405
415
|
export type IOMsg = import("../common/constants.js").IOMsg;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iosignal",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "iosignal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"repository": {
|
|
53
53
|
"type": "git",
|
|
54
|
-
"url": "https://github.com/remocons/iosignal.git",
|
|
54
|
+
"url": "git+https://github.com/remocons/iosignal.git",
|
|
55
55
|
"directory": "packages/iosignal"
|
|
56
56
|
},
|
|
57
57
|
"keywords": [
|