@seriousme/opifex 1.7.0 → 1.8.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.md +17 -2
- package/dist/bin/conformanceServer.d.ts +3 -0
- package/dist/bin/conformanceServer.d.ts.map +1 -0
- package/dist/bin/conformanceServer.js +98 -0
- package/dist/bin/conformanceServer.js.map +1 -0
- package/dist/bin/demoServer.d.ts +3 -0
- package/dist/bin/demoServer.d.ts.map +1 -0
- package/dist/bin/demoServer.js +97 -0
- package/dist/bin/demoServer.js.map +1 -0
- package/dist/bin/mqtt.d.ts +3 -0
- package/dist/bin/mqtt.d.ts.map +1 -0
- package/dist/bin/mqtt.js +257 -0
- package/dist/bin/mqtt.js.map +1 -0
- package/dist/client/ConnectionState.d.ts +21 -0
- package/dist/client/ConnectionState.d.ts.map +1 -0
- package/dist/client/ConnectionState.js +17 -0
- package/dist/client/ConnectionState.js.map +1 -0
- package/dist/client/client.d.ts +94 -0
- package/dist/client/client.d.ts.map +1 -0
- package/dist/client/client.js +188 -0
- package/dist/client/client.js.map +1 -0
- package/dist/client/context.d.ts +29 -0
- package/dist/client/context.d.ts.map +1 -0
- package/dist/client/context.js +153 -0
- package/dist/client/context.js.map +1 -0
- package/dist/client/deps.d.ts +8 -0
- package/dist/client/deps.d.ts.map +1 -0
- package/dist/client/deps.js +6 -0
- package/dist/client/deps.js.map +1 -0
- package/dist/client/handlers/handleConnack.d.ts +10 -0
- package/dist/client/handlers/handleConnack.d.ts.map +1 -0
- package/dist/client/handlers/handleConnack.js +25 -0
- package/dist/client/handlers/handleConnack.js.map +1 -0
- package/dist/client/handlers/handlePacket.d.ts +11 -0
- package/dist/client/handlers/handlePacket.d.ts.map +1 -0
- package/dist/client/handlers/handlePacket.js +58 -0
- package/dist/client/handlers/handlePacket.js.map +1 -0
- package/dist/client/handlers/handlePuback.d.ts +12 -0
- package/dist/client/handlers/handlePuback.d.ts.map +1 -0
- package/dist/client/handlers/handlePuback.js +14 -0
- package/dist/client/handlers/handlePuback.js.map +1 -0
- package/dist/client/handlers/handlePubcomp.d.ts +13 -0
- package/dist/client/handlers/handlePubcomp.d.ts.map +1 -0
- package/dist/client/handlers/handlePubcomp.js +17 -0
- package/dist/client/handlers/handlePubcomp.js.map +1 -0
- package/dist/client/handlers/handlePublish.d.ts +10 -0
- package/dist/client/handlers/handlePublish.d.ts.map +1 -0
- package/dist/client/handlers/handlePublish.js +34 -0
- package/dist/client/handlers/handlePublish.js.map +1 -0
- package/dist/client/handlers/handlePubrec.d.ts +17 -0
- package/dist/client/handlers/handlePubrec.d.ts.map +1 -0
- package/dist/client/handlers/handlePubrec.js +27 -0
- package/dist/client/handlers/handlePubrec.js.map +1 -0
- package/dist/client/handlers/handlePubrel.d.ts +20 -0
- package/dist/client/handlers/handlePubrel.d.ts.map +1 -0
- package/dist/client/handlers/handlePubrel.js +32 -0
- package/dist/client/handlers/handlePubrel.js.map +1 -0
- package/dist/client/handlers/handleSuback.d.ts +13 -0
- package/dist/client/handlers/handleSuback.d.ts.map +1 -0
- package/dist/client/handlers/handleSuback.js +15 -0
- package/dist/client/handlers/handleSuback.js.map +1 -0
- package/dist/client/handlers/handleUnsuback.d.ts +14 -0
- package/dist/client/handlers/handleUnsuback.d.ts.map +1 -0
- package/dist/client/handlers/handleUnsuback.js +16 -0
- package/dist/client/handlers/handleUnsuback.js.map +1 -0
- package/dist/client/mod.d.ts +7 -0
- package/dist/client/mod.d.ts.map +1 -0
- package/dist/client/mod.js +6 -0
- package/dist/client/mod.js.map +1 -0
- package/dist/client/store/deps.d.ts +3 -0
- package/dist/client/store/deps.d.ts.map +1 -0
- package/dist/client/store/deps.js +2 -0
- package/dist/client/store/deps.js.map +1 -0
- package/dist/client/store/memoryStore.d.ts +34 -0
- package/dist/client/store/memoryStore.d.ts.map +1 -0
- package/dist/client/store/memoryStore.js +59 -0
- package/dist/client/store/memoryStore.js.map +1 -0
- package/dist/client/store/store.d.ts +46 -0
- package/dist/client/store/store.d.ts.map +1 -0
- package/dist/client/store/store.js +5 -0
- package/dist/client/store/store.js.map +1 -0
- package/dist/mqttConn/mqttConn.d.ts +79 -0
- package/dist/mqttConn/mqttConn.d.ts.map +1 -0
- package/dist/mqttConn/mqttConn.js +151 -0
- package/dist/mqttConn/mqttConn.js.map +1 -0
- package/dist/mqttPacket/AuthenticationResult.d.ts +16 -0
- package/dist/mqttPacket/AuthenticationResult.d.ts.map +1 -0
- package/dist/mqttPacket/AuthenticationResult.js +17 -0
- package/dist/mqttPacket/AuthenticationResult.js.map +1 -0
- package/dist/mqttPacket/BitMask.d.ts +11 -0
- package/dist/mqttPacket/BitMask.d.ts.map +1 -0
- package/dist/mqttPacket/BitMask.js +11 -0
- package/dist/mqttPacket/BitMask.js.map +1 -0
- package/dist/mqttPacket/PacketType.d.ts +19 -0
- package/dist/mqttPacket/PacketType.d.ts.map +1 -0
- package/dist/mqttPacket/PacketType.js +19 -0
- package/dist/mqttPacket/PacketType.js.map +1 -0
- package/dist/mqttPacket/connack.d.ts +18 -0
- package/dist/mqttPacket/connack.d.ts.map +1 -0
- package/dist/mqttPacket/connack.js +28 -0
- package/dist/mqttPacket/connack.js.map +1 -0
- package/dist/mqttPacket/connect.d.ts +28 -0
- package/dist/mqttPacket/connect.d.ts.map +1 -0
- package/dist/mqttPacket/connect.js +116 -0
- package/dist/mqttPacket/connect.js.map +1 -0
- package/dist/mqttPacket/decoder.d.ts +24 -0
- package/dist/mqttPacket/decoder.d.ts.map +1 -0
- package/dist/mqttPacket/decoder.js +90 -0
- package/dist/mqttPacket/decoder.js.map +1 -0
- package/dist/mqttPacket/disconnect.d.ts +16 -0
- package/dist/mqttPacket/disconnect.d.ts.map +1 -0
- package/dist/mqttPacket/disconnect.js +15 -0
- package/dist/mqttPacket/disconnect.js.map +1 -0
- package/dist/mqttPacket/encoder.d.ts +17 -0
- package/dist/mqttPacket/encoder.d.ts.map +1 -0
- package/dist/mqttPacket/encoder.js +57 -0
- package/dist/mqttPacket/encoder.js.map +1 -0
- package/dist/mqttPacket/length.d.ts +12 -0
- package/dist/mqttPacket/length.d.ts.map +1 -0
- package/dist/mqttPacket/length.js +44 -0
- package/dist/mqttPacket/length.js.map +1 -0
- package/dist/mqttPacket/mod.d.ts +122 -0
- package/dist/mqttPacket/mod.d.ts.map +1 -0
- package/dist/mqttPacket/mod.js +77 -0
- package/dist/mqttPacket/mod.js.map +1 -0
- package/dist/mqttPacket/pingreq.d.ts +15 -0
- package/dist/mqttPacket/pingreq.d.ts.map +1 -0
- package/dist/mqttPacket/pingreq.js +16 -0
- package/dist/mqttPacket/pingreq.js.map +1 -0
- package/dist/mqttPacket/pingres.d.ts +16 -0
- package/dist/mqttPacket/pingres.d.ts.map +1 -0
- package/dist/mqttPacket/pingres.js +15 -0
- package/dist/mqttPacket/pingres.js.map +1 -0
- package/dist/mqttPacket/puback.d.ts +16 -0
- package/dist/mqttPacket/puback.d.ts.map +1 -0
- package/dist/mqttPacket/puback.js +21 -0
- package/dist/mqttPacket/puback.js.map +1 -0
- package/dist/mqttPacket/pubcomp.d.ts +17 -0
- package/dist/mqttPacket/pubcomp.d.ts.map +1 -0
- package/dist/mqttPacket/pubcomp.js +21 -0
- package/dist/mqttPacket/pubcomp.js.map +1 -0
- package/dist/mqttPacket/publish.d.ts +22 -0
- package/dist/mqttPacket/publish.d.ts.map +1 -0
- package/dist/mqttPacket/publish.js +52 -0
- package/dist/mqttPacket/publish.js.map +1 -0
- package/dist/mqttPacket/pubrec.d.ts +17 -0
- package/dist/mqttPacket/pubrec.d.ts.map +1 -0
- package/dist/mqttPacket/pubrec.js +21 -0
- package/dist/mqttPacket/pubrec.js.map +1 -0
- package/dist/mqttPacket/pubrel.d.ts +17 -0
- package/dist/mqttPacket/pubrel.d.ts.map +1 -0
- package/dist/mqttPacket/pubrel.js +21 -0
- package/dist/mqttPacket/pubrel.js.map +1 -0
- package/dist/mqttPacket/suback.d.ts +18 -0
- package/dist/mqttPacket/suback.d.ts.map +1 -0
- package/dist/mqttPacket/suback.js +30 -0
- package/dist/mqttPacket/suback.js.map +1 -0
- package/dist/mqttPacket/subscribe.d.ts +24 -0
- package/dist/mqttPacket/subscribe.d.ts.map +1 -0
- package/dist/mqttPacket/subscribe.js +53 -0
- package/dist/mqttPacket/subscribe.js.map +1 -0
- package/dist/mqttPacket/types.d.ts +48 -0
- package/dist/mqttPacket/types.d.ts.map +1 -0
- package/dist/mqttPacket/types.js +2 -0
- package/dist/mqttPacket/types.js.map +1 -0
- package/dist/mqttPacket/unsuback.d.ts +17 -0
- package/dist/mqttPacket/unsuback.d.ts.map +1 -0
- package/dist/mqttPacket/unsuback.js +21 -0
- package/dist/mqttPacket/unsuback.js.map +1 -0
- package/dist/mqttPacket/unsubscribe.d.ts +17 -0
- package/dist/mqttPacket/unsubscribe.d.ts.map +1 -0
- package/dist/mqttPacket/unsubscribe.js +37 -0
- package/dist/mqttPacket/unsubscribe.js.map +1 -0
- package/dist/mqttPacket/validators.d.ts +5 -0
- package/dist/mqttPacket/validators.d.ts.map +1 -0
- package/dist/mqttPacket/validators.js +16 -0
- package/dist/mqttPacket/validators.js.map +1 -0
- package/dist/node/tcpClient.d.ts +18 -0
- package/dist/node/tcpClient.d.ts.map +1 -0
- package/dist/node/tcpClient.js +82 -0
- package/dist/node/tcpClient.js.map +1 -0
- package/dist/node/tcpServer.d.ts +17 -0
- package/dist/node/tcpServer.d.ts.map +1 -0
- package/dist/node/tcpServer.js +51 -0
- package/dist/node/tcpServer.js.map +1 -0
- package/dist/node/wrapNodeSocket.d.ts +12 -0
- package/dist/node/wrapNodeSocket.d.ts.map +1 -0
- package/dist/node/wrapNodeSocket.js +57 -0
- package/dist/node/wrapNodeSocket.js.map +1 -0
- package/dist/persistence/deps.d.ts +5 -0
- package/dist/persistence/deps.d.ts.map +1 -0
- package/dist/persistence/deps.js +4 -0
- package/dist/persistence/deps.js.map +1 -0
- package/dist/persistence/memory/memoryPersistence.d.ts +28 -0
- package/dist/persistence/memory/memoryPersistence.d.ts.map +1 -0
- package/dist/persistence/memory/memoryPersistence.js +119 -0
- package/dist/persistence/memory/memoryPersistence.js.map +1 -0
- package/dist/persistence/persistence.d.ts +81 -0
- package/dist/persistence/persistence.d.ts.map +1 -0
- package/dist/persistence/persistence.js +2 -0
- package/dist/persistence/persistence.js.map +1 -0
- package/dist/persistence/store.d.ts +13 -0
- package/dist/persistence/store.d.ts.map +1 -0
- package/dist/persistence/store.js +2 -0
- package/dist/persistence/store.js.map +1 -0
- package/dist/server/context.d.ts +45 -0
- package/dist/server/context.d.ts.map +1 -0
- package/dist/server/context.js +101 -0
- package/dist/server/context.js.map +1 -0
- package/dist/server/deps.d.ts +10 -0
- package/dist/server/deps.d.ts.map +1 -0
- package/dist/server/deps.js +6 -0
- package/dist/server/deps.js.map +1 -0
- package/dist/server/handlers/handleConnect.d.ts +9 -0
- package/dist/server/handlers/handleConnect.d.ts.map +1 -0
- package/dist/server/handlers/handleConnect.js +81 -0
- package/dist/server/handlers/handleConnect.js.map +1 -0
- package/dist/server/handlers/handleDisconnect.d.ts +8 -0
- package/dist/server/handlers/handleDisconnect.d.ts.map +1 -0
- package/dist/server/handlers/handleDisconnect.js +10 -0
- package/dist/server/handlers/handleDisconnect.js.map +1 -0
- package/dist/server/handlers/handlePacket.d.ts +11 -0
- package/dist/server/handlers/handlePacket.d.ts.map +1 -0
- package/dist/server/handlers/handlePacket.js +66 -0
- package/dist/server/handlers/handlePacket.js.map +1 -0
- package/dist/server/handlers/handlePingreq.d.ts +8 -0
- package/dist/server/handlers/handlePingreq.d.ts.map +1 -0
- package/dist/server/handlers/handlePingreq.js +12 -0
- package/dist/server/handlers/handlePingreq.js.map +1 -0
- package/dist/server/handlers/handlePuback.d.ts +13 -0
- package/dist/server/handlers/handlePuback.d.ts.map +1 -0
- package/dist/server/handlers/handlePuback.js +17 -0
- package/dist/server/handlers/handlePuback.js.map +1 -0
- package/dist/server/handlers/handlePubcomp.d.ts +12 -0
- package/dist/server/handlers/handlePubcomp.d.ts.map +1 -0
- package/dist/server/handlers/handlePubcomp.js +15 -0
- package/dist/server/handlers/handlePubcomp.js.map +1 -0
- package/dist/server/handlers/handlePublish.d.ts +11 -0
- package/dist/server/handlers/handlePublish.d.ts.map +1 -0
- package/dist/server/handlers/handlePublish.js +55 -0
- package/dist/server/handlers/handlePublish.js.map +1 -0
- package/dist/server/handlers/handlePubrec.d.ts +15 -0
- package/dist/server/handlers/handlePubrec.d.ts.map +1 -0
- package/dist/server/handlers/handlePubrec.js +24 -0
- package/dist/server/handlers/handlePubrec.js.map +1 -0
- package/dist/server/handlers/handlePubrel.d.ts +16 -0
- package/dist/server/handlers/handlePubrel.d.ts.map +1 -0
- package/dist/server/handlers/handlePubrel.js +28 -0
- package/dist/server/handlers/handlePubrel.js.map +1 -0
- package/dist/server/handlers/handleSubscribe.d.ts +13 -0
- package/dist/server/handlers/handleSubscribe.d.ts.map +1 -0
- package/dist/server/handlers/handleSubscribe.js +57 -0
- package/dist/server/handlers/handleSubscribe.js.map +1 -0
- package/dist/server/handlers/handleUnsubscribe.d.ts +10 -0
- package/dist/server/handlers/handleUnsubscribe.d.ts.map +1 -0
- package/dist/server/handlers/handleUnsubscribe.js +19 -0
- package/dist/server/handlers/handleUnsubscribe.js.map +1 -0
- package/dist/server/mod.d.ts +11 -0
- package/dist/server/mod.d.ts.map +1 -0
- package/dist/server/mod.js +8 -0
- package/dist/server/mod.js.map +1 -0
- package/dist/server/server.d.ts +27 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +48 -0
- package/dist/server/server.js.map +1 -0
- package/dist/socket/socket.d.ts +29 -0
- package/dist/socket/socket.d.ts.map +1 -0
- package/dist/socket/socket.js +37 -0
- package/dist/socket/socket.js.map +1 -0
- package/dist/timer/timer.d.ts +13 -0
- package/dist/timer/timer.d.ts.map +1 -0
- package/dist/timer/timer.js +41 -0
- package/dist/timer/timer.js.map +1 -0
- package/dist/trie/trie.d.ts +21 -0
- package/dist/trie/trie.d.ts.map +1 -0
- package/dist/trie/trie.js +96 -0
- package/dist/trie/trie.js.map +1 -0
- package/dist/utils/args.d.ts +28 -0
- package/dist/utils/args.d.ts.map +1 -0
- package/dist/utils/args.js +76 -0
- package/dist/utils/args.js.map +1 -0
- package/dist/utils/assert.d.ts +10 -0
- package/dist/utils/assert.d.ts.map +1 -0
- package/dist/utils/assert.js +21 -0
- package/dist/utils/assert.js.map +1 -0
- package/dist/utils/asyncQueue.d.ts +28 -0
- package/dist/utils/asyncQueue.d.ts.map +1 -0
- package/dist/utils/asyncQueue.js +70 -0
- package/dist/utils/asyncQueue.js.map +1 -0
- package/dist/utils/deferred.d.ts +10 -0
- package/dist/utils/deferred.d.ts.map +1 -0
- package/dist/utils/deferred.js +15 -0
- package/dist/utils/deferred.js.map +1 -0
- package/dist/utils/logger.d.ts +63 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +59 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/mod.d.ts +13 -0
- package/dist/utils/mod.d.ts.map +1 -0
- package/dist/utils/mod.js +12 -0
- package/dist/utils/mod.js.map +1 -0
- package/dist/utils/nextTick.d.ts +17 -0
- package/dist/utils/nextTick.d.ts.map +1 -0
- package/dist/utils/nextTick.js +19 -0
- package/dist/utils/nextTick.js.map +1 -0
- package/dist/utils/platform.d.ts +5 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +8 -0
- package/dist/utils/platform.js.map +1 -0
- package/examples/tcpServer.test.ts +149 -0
- package/mqttConn/mqttConn.ts +58 -2
- package/package.json +14 -10
- package/persistence/persistence.ts +66 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import type { PubackPacket } from "../deps.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Handles PUBACK packet processing for QoS level 1 PUBLISH responses
|
|
5
|
+
* @param ctx - The MQTT client context
|
|
6
|
+
* @param packet - The PUBACK packet received from the broker
|
|
7
|
+
* @description
|
|
8
|
+
* - Removes the packet ID from the list of pending outgoing messages
|
|
9
|
+
* - Completes the corresponding publish operation
|
|
10
|
+
*/
|
|
11
|
+
export declare function handlePuback(ctx: Context, packet: PubackPacket): void;
|
|
12
|
+
//# sourceMappingURL=handlePuback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePuback.d.ts","sourceRoot":"","sources":["../../../client/handlers/handlePuback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAIrE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handles PUBACK packet processing for QoS level 1 PUBLISH responses
|
|
3
|
+
* @param ctx - The MQTT client context
|
|
4
|
+
* @param packet - The PUBACK packet received from the broker
|
|
5
|
+
* @description
|
|
6
|
+
* - Removes the packet ID from the list of pending outgoing messages
|
|
7
|
+
* - Completes the corresponding publish operation
|
|
8
|
+
*/
|
|
9
|
+
export function handlePuback(ctx, packet) {
|
|
10
|
+
const id = packet.id;
|
|
11
|
+
ctx.store.pendingOutgoing.delete(id);
|
|
12
|
+
ctx.receivePuback(id);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=handlePuback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePuback.js","sourceRoot":"","sources":["../../../client/handlers/handlePuback.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY,EAAE,MAAoB;IAC7D,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import type { PubcompPacket } from "../deps.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Handles PUBCOMP packets which are the response to PUBREL packets in QoS 2 flow
|
|
5
|
+
* @param ctx - The connection context containing the client state and store
|
|
6
|
+
* @param packet - The PUBCOMP packet received from the broker
|
|
7
|
+
* @description
|
|
8
|
+
* This function processes PUBCOMP packets which are the fourth and final packet
|
|
9
|
+
* in the QoS 2 protocol exchange. It removes the message from pendingAckOutgoing queue
|
|
10
|
+
* Completes the corresponding publish operation
|
|
11
|
+
*/
|
|
12
|
+
export declare function handlePubcomp(ctx: Context, packet: PubcompPacket): void;
|
|
13
|
+
//# sourceMappingURL=handlePubcomp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePubcomp.d.ts","sourceRoot":"","sources":["../../../client/handlers/handlePubcomp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAMvE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handles PUBCOMP packets which are the response to PUBREL packets in QoS 2 flow
|
|
3
|
+
* @param ctx - The connection context containing the client state and store
|
|
4
|
+
* @param packet - The PUBCOMP packet received from the broker
|
|
5
|
+
* @description
|
|
6
|
+
* This function processes PUBCOMP packets which are the fourth and final packet
|
|
7
|
+
* in the QoS 2 protocol exchange. It removes the message from pendingAckOutgoing queue
|
|
8
|
+
* Completes the corresponding publish operation
|
|
9
|
+
*/
|
|
10
|
+
export function handlePubcomp(ctx, packet) {
|
|
11
|
+
const id = packet.id;
|
|
12
|
+
if (ctx.store.pendingAckOutgoing.has(id)) {
|
|
13
|
+
ctx.store.pendingAckOutgoing.delete(id);
|
|
14
|
+
ctx.receivePubcomp(id);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=handlePubcomp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePubcomp.js","sourceRoot":"","sources":["../../../client/handlers/handlePubcomp.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,GAAY,EAAE,MAAqB;IAC/D,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,IAAI,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;QACzC,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACxC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { type PublishPacket } from "../deps.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Handles incoming MQTT publish packets based on their QoS level
|
|
5
|
+
* @param ctx - The MQTT connection context
|
|
6
|
+
* @param packet - The incoming publish packet to handle
|
|
7
|
+
* @returns Promise that resolves when packet is handled
|
|
8
|
+
*/
|
|
9
|
+
export declare function handlePublish(ctx: Context, packet: PublishPacket): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=handlePublish.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePublish.d.ts","sourceRoot":"","sources":["../../../client/handlers/handlePublish.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,iBA0BtE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PacketType } from "../deps.js";
|
|
2
|
+
/**
|
|
3
|
+
* Handles incoming MQTT publish packets based on their QoS level
|
|
4
|
+
* @param ctx - The MQTT connection context
|
|
5
|
+
* @param packet - The incoming publish packet to handle
|
|
6
|
+
* @returns Promise that resolves when packet is handled
|
|
7
|
+
*/
|
|
8
|
+
export async function handlePublish(ctx, packet) {
|
|
9
|
+
const qos = packet.qos || 0;
|
|
10
|
+
if (qos === 0) {
|
|
11
|
+
ctx.receivePublish(packet);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (packet.id !== undefined) {
|
|
15
|
+
// qos 1
|
|
16
|
+
if (qos === 1) {
|
|
17
|
+
ctx.receivePublish(packet);
|
|
18
|
+
await ctx.send({
|
|
19
|
+
type: PacketType.puback,
|
|
20
|
+
id: packet.id,
|
|
21
|
+
});
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
// qos 2
|
|
25
|
+
if (ctx.store) {
|
|
26
|
+
ctx.store.pendingIncoming.set(packet.id, packet);
|
|
27
|
+
await ctx.send({
|
|
28
|
+
type: PacketType.pubrec,
|
|
29
|
+
id: packet.id,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=handlePublish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePublish.js","sourceRoot":"","sources":["../../../client/handlers/handlePublish.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAY,EAAE,MAAqB;IACrE,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IAC5B,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;QACd,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC3B,OAAO;IACT,CAAC;IAED,IAAI,MAAM,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QAC5B,QAAQ;QACR,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;YACd,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAC3B,MAAM,GAAG,CAAC,IAAI,CAAC;gBACb,IAAI,EAAE,UAAU,CAAC,MAAM;gBACvB,EAAE,EAAE,MAAM,CAAC,EAAE;aACd,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QACD,QAAQ;QACR,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;YACd,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;YACjD,MAAM,GAAG,CAAC,IAAI,CAAC;gBACb,IAAI,EAAE,UAAU,CAAC,MAAM;gBACvB,EAAE,EAAE,MAAM,CAAC,EAAE;aACd,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { type PubrecPacket } from "../deps.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Handles PUBREC (Publish Received) packets for QoS 2 message flow
|
|
5
|
+
* It is the second packet of the QoS 2 protocol exchange.
|
|
6
|
+
* @param ctx - The connection context containing message stores and send function
|
|
7
|
+
* @param packet - The received PUBREC packet
|
|
8
|
+
* @description
|
|
9
|
+
* When a PUBREC packet is received:
|
|
10
|
+
* 1. Checks if there is a pending outgoing message with matching packet ID
|
|
11
|
+
* 2. Creates a PUBREL packet to acknowledge the PUBREC
|
|
12
|
+
* 3. Add the packet ID to pendingAckOutgoing store
|
|
13
|
+
* 4. Removes the message from pendingOutgoing store
|
|
14
|
+
* 5. Sends the PUBREL packet
|
|
15
|
+
*/
|
|
16
|
+
export declare function handlePubrec(ctx: Context, packet: PubrecPacket): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=handlePubrec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePubrec.d.ts","sourceRoot":"","sources":["../../../client/handlers/handlePubrec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAc,KAAK,YAAY,EAAqB,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC,CAWf"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PacketType } from "../deps.js";
|
|
2
|
+
/**
|
|
3
|
+
* Handles PUBREC (Publish Received) packets for QoS 2 message flow
|
|
4
|
+
* It is the second packet of the QoS 2 protocol exchange.
|
|
5
|
+
* @param ctx - The connection context containing message stores and send function
|
|
6
|
+
* @param packet - The received PUBREC packet
|
|
7
|
+
* @description
|
|
8
|
+
* When a PUBREC packet is received:
|
|
9
|
+
* 1. Checks if there is a pending outgoing message with matching packet ID
|
|
10
|
+
* 2. Creates a PUBREL packet to acknowledge the PUBREC
|
|
11
|
+
* 3. Add the packet ID to pendingAckOutgoing store
|
|
12
|
+
* 4. Removes the message from pendingOutgoing store
|
|
13
|
+
* 5. Sends the PUBREL packet
|
|
14
|
+
*/
|
|
15
|
+
export async function handlePubrec(ctx, packet) {
|
|
16
|
+
const id = packet.id;
|
|
17
|
+
const ack = {
|
|
18
|
+
type: PacketType.pubrel,
|
|
19
|
+
id,
|
|
20
|
+
};
|
|
21
|
+
if (ctx.store.pendingOutgoing.has(id)) {
|
|
22
|
+
ctx.store.pendingAckOutgoing.set(id, ack);
|
|
23
|
+
ctx.store.pendingOutgoing.delete(id);
|
|
24
|
+
await ctx.send(ack);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=handlePubrec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePubrec.js","sourceRoot":"","sources":["../../../client/handlers/handlePubrec.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAwC,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,GAAY,EACZ,MAAoB;IAEpB,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,MAAM,GAAG,GAAiB;QACxB,IAAI,EAAE,UAAU,CAAC,MAAM;QACvB,EAAE;KACH,CAAC;IACF,IAAI,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;QACtC,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QAC1C,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACrC,MAAM,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { type PubrelPacket } from "../deps.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Handles a PUBREL packet in the MQTT QoS 2 flow
|
|
5
|
+
* It is the third packet of the QoS 2 protocol exchange
|
|
6
|
+
* and a response to the PUBREC packet
|
|
7
|
+
*
|
|
8
|
+
* It uses Method A from the MQTT specification
|
|
9
|
+
* @param ctx - The MQTT client context
|
|
10
|
+
* @param packet - The PUBREL packet received
|
|
11
|
+
* @description
|
|
12
|
+
* When a PUBREL packet is received:
|
|
13
|
+
* 1. If there is a matching pending incoming message:
|
|
14
|
+
* - Delivers the stored message to the application
|
|
15
|
+
* - Removes the message from pending incoming store
|
|
16
|
+
* - Sends PUBCOMP packet as acknowledgement
|
|
17
|
+
* 2. If no matching message found, silently ignores
|
|
18
|
+
*/
|
|
19
|
+
export declare function handlePubrel(ctx: Context, packet: PubrelPacket): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=handlePubrel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePubrel.d.ts","sourceRoot":"","sources":["../../../client/handlers/handlePubrel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE3D;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC,CAaf"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PacketType } from "../deps.js";
|
|
2
|
+
/**
|
|
3
|
+
* Handles a PUBREL packet in the MQTT QoS 2 flow
|
|
4
|
+
* It is the third packet of the QoS 2 protocol exchange
|
|
5
|
+
* and a response to the PUBREC packet
|
|
6
|
+
*
|
|
7
|
+
* It uses Method A from the MQTT specification
|
|
8
|
+
* @param ctx - The MQTT client context
|
|
9
|
+
* @param packet - The PUBREL packet received
|
|
10
|
+
* @description
|
|
11
|
+
* When a PUBREL packet is received:
|
|
12
|
+
* 1. If there is a matching pending incoming message:
|
|
13
|
+
* - Delivers the stored message to the application
|
|
14
|
+
* - Removes the message from pending incoming store
|
|
15
|
+
* - Sends PUBCOMP packet as acknowledgement
|
|
16
|
+
* 2. If no matching message found, silently ignores
|
|
17
|
+
*/
|
|
18
|
+
export async function handlePubrel(ctx, packet) {
|
|
19
|
+
const id = packet.id;
|
|
20
|
+
if (ctx.store.pendingIncoming.has(id)) {
|
|
21
|
+
const storedPacket = ctx.store.pendingIncoming.get(id);
|
|
22
|
+
if (storedPacket) {
|
|
23
|
+
ctx.receivePublish(storedPacket);
|
|
24
|
+
ctx.store.pendingIncoming.delete(id);
|
|
25
|
+
await ctx.send({
|
|
26
|
+
type: PacketType.pubcomp,
|
|
27
|
+
id,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=handlePubrel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePubrel.js","sourceRoot":"","sources":["../../../client/handlers/handlePubrel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAqB,MAAM,YAAY,CAAC;AAE3D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,GAAY,EACZ,MAAoB;IAEpB,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,IAAI,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;QACtC,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACvD,IAAI,YAAY,EAAE,CAAC;YACjB,GAAG,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;YACjC,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACrC,MAAM,GAAG,CAAC,IAAI,CAAC;gBACb,IAAI,EAAE,UAAU,CAAC,OAAO;gBACxB,EAAE;aACH,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import type { SubackPacket } from "../deps.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Handles SUBACK packets received from the server
|
|
5
|
+
* @param ctx - The MQTT client context
|
|
6
|
+
* @param packet - The SUBACK packet containing subscription confirmations
|
|
7
|
+
* @description
|
|
8
|
+
* - Processes SUBACK packets sent by server to confirm SUBSCRIBE requests
|
|
9
|
+
* - Removes the packet ID from pending outgoing messages
|
|
10
|
+
* - Notifies the client about granted QoS levels for each subscription
|
|
11
|
+
*/
|
|
12
|
+
export declare function handleSuback(ctx: Context, packet: SubackPacket): void;
|
|
13
|
+
//# sourceMappingURL=handleSuback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleSuback.d.ts","sourceRoot":"","sources":["../../../client/handlers/handleSuback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAIrE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handles SUBACK packets received from the server
|
|
3
|
+
* @param ctx - The MQTT client context
|
|
4
|
+
* @param packet - The SUBACK packet containing subscription confirmations
|
|
5
|
+
* @description
|
|
6
|
+
* - Processes SUBACK packets sent by server to confirm SUBSCRIBE requests
|
|
7
|
+
* - Removes the packet ID from pending outgoing messages
|
|
8
|
+
* - Notifies the client about granted QoS levels for each subscription
|
|
9
|
+
*/
|
|
10
|
+
export function handleSuback(ctx, packet) {
|
|
11
|
+
const id = packet.id;
|
|
12
|
+
ctx.store.pendingOutgoing.delete(id);
|
|
13
|
+
ctx.receiveSuback(id, packet.returnCodes);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=handleSuback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleSuback.js","sourceRoot":"","sources":["../../../client/handlers/handleSuback.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY,EAAE,MAAoB;IAC7D,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,GAAG,CAAC,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import type { UnsubackPacket } from "../deps.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Handles the UNSUBACK packet received from the server
|
|
5
|
+
* @param ctx - The MQTT client context
|
|
6
|
+
* @param packet - The UNSUBACK packet received from the server
|
|
7
|
+
* @description
|
|
8
|
+
* The UNSUBACK Packet is sent by the Server to the Client to confirm receipt of
|
|
9
|
+
* an UNSUBSCRIBE Packet.
|
|
10
|
+
* When received, it removes the pending outgoing request and completes the corresponding
|
|
11
|
+
* unsubscribe operation.
|
|
12
|
+
*/
|
|
13
|
+
export declare function handleUnsuback(ctx: Context, packet: UnsubackPacket): void;
|
|
14
|
+
//# sourceMappingURL=handleUnsuback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleUnsuback.d.ts","sourceRoot":"","sources":["../../../client/handlers/handleUnsuback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAIzE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handles the UNSUBACK packet received from the server
|
|
3
|
+
* @param ctx - The MQTT client context
|
|
4
|
+
* @param packet - The UNSUBACK packet received from the server
|
|
5
|
+
* @description
|
|
6
|
+
* The UNSUBACK Packet is sent by the Server to the Client to confirm receipt of
|
|
7
|
+
* an UNSUBSCRIBE Packet.
|
|
8
|
+
* When received, it removes the pending outgoing request and completes the corresponding
|
|
9
|
+
* unsubscribe operation.
|
|
10
|
+
*/
|
|
11
|
+
export function handleUnsuback(ctx, packet) {
|
|
12
|
+
const id = packet.id;
|
|
13
|
+
ctx.store.pendingOutgoing.delete(id);
|
|
14
|
+
ctx.receiveUnsuback(id);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=handleUnsuback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleUnsuback.js","sourceRoot":"","sources":["../../../client/handlers/handleUnsuback.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY,EAAE,MAAsB;IACjE,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides an MQTT Client interface see the /bin folder for examples
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
export { Client, DEFAULT_URL } from "./client.ts";
|
|
6
|
+
export type { ConnectParameters, PublishParameters, SubscribeParameters, } from "./client.ts";
|
|
7
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../client/mod.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../../client/mod.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { AnyPacket, ConnackPacket, ConnectPacket, DisconnectPacket, Dup, PacketId, Payload, PubackPacket, PubcompPacket, PublishPacket, PubrecPacket, PubrelPacket, ReturnCodes, SubackPacket, SubscribePacket, Topic, UnsubackPacket, UnsubscribePacket, } from "../../mqttPacket/mod.ts";
|
|
2
|
+
export { assert } from "../../utils/mod.ts";
|
|
3
|
+
//# sourceMappingURL=deps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../../client/store/deps.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,SAAS,EACT,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,GAAG,EACH,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,eAAe,EACf,KAAK,EACL,cAAc,EACd,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deps.js","sourceRoot":"","sources":["../../../client/store/deps.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module memoryStore
|
|
3
|
+
*/
|
|
4
|
+
import { type PacketId } from "./deps.ts";
|
|
5
|
+
import { type IStore, type PacketStore, type PendingAckOutgoing, type pendingIncoming, type PendingOutgoing, type PendingOutgoingPackets } from "./store.ts";
|
|
6
|
+
/**
|
|
7
|
+
* In-memory implementation of the IStore interface for managing MQTT packet storage
|
|
8
|
+
*/
|
|
9
|
+
export declare class MemoryStore implements IStore {
|
|
10
|
+
/** Current packet ID counter */
|
|
11
|
+
private packetId;
|
|
12
|
+
/** Map of pending incoming packets */
|
|
13
|
+
pendingIncoming: PacketStore<pendingIncoming>;
|
|
14
|
+
/** Map of pending outgoing packets */
|
|
15
|
+
pendingOutgoing: PacketStore<PendingOutgoing>;
|
|
16
|
+
/** Map of pending acknowledgment outgoing packets */
|
|
17
|
+
pendingAckOutgoing: PacketStore<PendingAckOutgoing>;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new MemoryStore instance
|
|
20
|
+
*/
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Generates the next available packet ID
|
|
24
|
+
* @returns {PacketId} The next available packet ID
|
|
25
|
+
* @throws {Error} If no unused packet ID is available
|
|
26
|
+
*/
|
|
27
|
+
nextId(): PacketId;
|
|
28
|
+
/**
|
|
29
|
+
* Asynchronously yields all pending outgoing packets
|
|
30
|
+
* @yields {PendingOutgoingPackets} Pending outgoing packets
|
|
31
|
+
*/
|
|
32
|
+
pendingOutgoingPackets(): AsyncGenerator<PendingOutgoingPackets, void, unknown>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=memoryStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoryStore.d.ts","sourceRoot":"","sources":["../../../client/store/memoryStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAU,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC5B,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,qBAAa,WAAY,YAAW,MAAM;IACxC,gCAAgC;IAChC,OAAO,CAAC,QAAQ,CAAW;IAE3B,sCAAsC;IACtC,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IAE9C,sCAAsC;IACtC,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IAE9C,qDAAqD;IACrD,kBAAkB,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAEpD;;OAEG;;IAQH;;;;OAIG;IACH,MAAM,IAAI,QAAQ;IAiBlB;;;OAGG;IACI,sBAAsB,IAAI,cAAc,CAC7C,sBAAsB,EACtB,IAAI,EACJ,OAAO,CACR;CAQF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module memoryStore
|
|
3
|
+
*/
|
|
4
|
+
import { assert } from "./deps.js";
|
|
5
|
+
import { maxPacketId, } from "./store.js";
|
|
6
|
+
/**
|
|
7
|
+
* In-memory implementation of the IStore interface for managing MQTT packet storage
|
|
8
|
+
*/
|
|
9
|
+
export class MemoryStore {
|
|
10
|
+
/** Current packet ID counter */
|
|
11
|
+
packetId;
|
|
12
|
+
/** Map of pending incoming packets */
|
|
13
|
+
pendingIncoming;
|
|
14
|
+
/** Map of pending outgoing packets */
|
|
15
|
+
pendingOutgoing;
|
|
16
|
+
/** Map of pending acknowledgment outgoing packets */
|
|
17
|
+
pendingAckOutgoing;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new MemoryStore instance
|
|
20
|
+
*/
|
|
21
|
+
constructor() {
|
|
22
|
+
this.packetId = 0;
|
|
23
|
+
this.pendingIncoming = new Map();
|
|
24
|
+
this.pendingOutgoing = new Map();
|
|
25
|
+
this.pendingAckOutgoing = new Map();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Generates the next available packet ID
|
|
29
|
+
* @returns {PacketId} The next available packet ID
|
|
30
|
+
* @throws {Error} If no unused packet ID is available
|
|
31
|
+
*/
|
|
32
|
+
nextId() {
|
|
33
|
+
const currentId = this.packetId;
|
|
34
|
+
do {
|
|
35
|
+
this.packetId++;
|
|
36
|
+
if (this.packetId > maxPacketId) {
|
|
37
|
+
this.packetId = 1;
|
|
38
|
+
}
|
|
39
|
+
} while ((this.pendingIncoming.has(this.packetId) ||
|
|
40
|
+
this.pendingOutgoing.has(this.packetId) ||
|
|
41
|
+
this.pendingAckOutgoing.has(this.packetId)) &&
|
|
42
|
+
this.packetId !== currentId);
|
|
43
|
+
assert(this.packetId !== currentId, "No unused packetId available");
|
|
44
|
+
return this.packetId;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Asynchronously yields all pending outgoing packets
|
|
48
|
+
* @yields {PendingOutgoingPackets} Pending outgoing packets
|
|
49
|
+
*/
|
|
50
|
+
async *pendingOutgoingPackets() {
|
|
51
|
+
for (const [_id, packet] of this.pendingAckOutgoing) {
|
|
52
|
+
yield packet;
|
|
53
|
+
}
|
|
54
|
+
for (const [_id, packet] of this.pendingOutgoing) {
|
|
55
|
+
yield packet;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=memoryStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoryStore.js","sourceRoot":"","sources":["../../../client/store/memoryStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAiB,MAAM,WAAW,CAAC;AAElD,OAAO,EAEL,WAAW,GAMZ,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,OAAO,WAAW;IACtB,gCAAgC;IACxB,QAAQ,CAAW;IAE3B,sCAAsC;IACtC,eAAe,CAA+B;IAE9C,sCAAsC;IACtC,eAAe,CAA+B;IAE9C,qDAAqD;IACrD,kBAAkB,CAAkC;IAEpD;;OAEG;IACH;QACE,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAChC,GAAG,CAAC;YACF,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,QAAQ,GAAG,WAAW,EAAE,CAAC;gBAChC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,QACC,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YACtC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YACvC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC7C,IAAI,CAAC,QAAQ,KAAK,SAAS,EAC3B;QACF,MAAM,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,8BAA8B,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,CAAC,sBAAsB;QAK3B,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACpD,MAAM,MAAM,CAAC;QACf,CAAC;QACD,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACjD,MAAM,MAAM,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module MQTT Store Types
|
|
3
|
+
*/
|
|
4
|
+
import type { PacketId, PublishPacket, PubrelPacket, SubscribePacket, UnsubscribePacket } from "./deps.ts";
|
|
5
|
+
/**
|
|
6
|
+
* Maximum value for MQTT packet IDs (65535)
|
|
7
|
+
*/
|
|
8
|
+
export declare const maxPacketId = 65535;
|
|
9
|
+
/**
|
|
10
|
+
* Generic type for storing MQTT packets by their packet ID
|
|
11
|
+
* @template T The packet type to store
|
|
12
|
+
*/
|
|
13
|
+
export type PacketStore<T> = Map<PacketId, T>;
|
|
14
|
+
/**
|
|
15
|
+
* Type for incoming PUBLISH packets that are pending processing
|
|
16
|
+
*/
|
|
17
|
+
export type pendingIncoming = PublishPacket;
|
|
18
|
+
/**
|
|
19
|
+
* Type for outgoing packets (PUBLISH, SUBSCRIBE, UNSUBSCRIBE) that are pending sending
|
|
20
|
+
*/
|
|
21
|
+
export type PendingOutgoing = PublishPacket | SubscribePacket | UnsubscribePacket;
|
|
22
|
+
/**
|
|
23
|
+
* Type for outgoing PUBREL packets that are pending acknowledgement
|
|
24
|
+
*/
|
|
25
|
+
export type PendingAckOutgoing = PubrelPacket;
|
|
26
|
+
/**
|
|
27
|
+
* Union type of all pending outgoing packet types
|
|
28
|
+
*/
|
|
29
|
+
export type PendingOutgoingPackets = PendingAckOutgoing | PendingOutgoing;
|
|
30
|
+
/**
|
|
31
|
+
* Interface defining the storage requirements for MQTT packet state management
|
|
32
|
+
*/
|
|
33
|
+
export interface IStore {
|
|
34
|
+
/** Store for incoming packets pending processing */
|
|
35
|
+
pendingIncoming: PacketStore<pendingIncoming>;
|
|
36
|
+
/** Store for outgoing packets pending sending */
|
|
37
|
+
pendingOutgoing: PacketStore<PendingOutgoing>;
|
|
38
|
+
/** Store for outgoing packets pending acknowledgement */
|
|
39
|
+
pendingAckOutgoing: PacketStore<PendingAckOutgoing>;
|
|
40
|
+
/**
|
|
41
|
+
* Generator that yields pending outgoing packets
|
|
42
|
+
* @returns AsyncGenerator that yields PendingOutgoing or PubrelPacket packets
|
|
43
|
+
*/
|
|
44
|
+
pendingOutgoingPackets(): AsyncGenerator<PendingOutgoing | PubrelPacket, void, unknown>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../client/store/store.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,eAAe,EACf,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,eAAO,MAAM,WAAW,QAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,aAAa,GACb,eAAe,GACf,iBAAiB,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,GAAG,eAAe,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,oDAAoD;IACpD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IAE9C,iDAAiD;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IAE9C,yDAAyD;IACzD,kBAAkB,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAEpD;;;OAGG;IACH,sBAAsB,IAAI,cAAc,CACtC,eAAe,GAAG,YAAY,EAC9B,IAAI,EACJ,OAAO,CACR,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../client/store/store.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module mqttConn
|
|
3
|
+
*/
|
|
4
|
+
import { type AnyPacket } from "../mqttPacket/mod.ts";
|
|
5
|
+
import type { SockConn } from "../socket/socket.ts";
|
|
6
|
+
import { Conn } from "../socket/socket.ts";
|
|
7
|
+
/**
|
|
8
|
+
* Common MQTT connection error messages
|
|
9
|
+
*/
|
|
10
|
+
export declare const MqttConnError: {
|
|
11
|
+
readonly invalidPacket: "Invalid Packet";
|
|
12
|
+
readonly packetTooLarge: "Packet too large";
|
|
13
|
+
readonly UnexpectedEof: "Unexpected EOF";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Interface for MQTT connection handling
|
|
17
|
+
*/
|
|
18
|
+
export interface IMqttConn extends AsyncIterable<AnyPacket> {
|
|
19
|
+
/** Underlying connection */
|
|
20
|
+
readonly conn: Conn;
|
|
21
|
+
/** Whether connection is closed */
|
|
22
|
+
readonly isClosed: boolean;
|
|
23
|
+
/** Reason for connection closure if any */
|
|
24
|
+
readonly reason: string | undefined;
|
|
25
|
+
/** Async iterator for receiving packets */
|
|
26
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<AnyPacket>;
|
|
27
|
+
/** Send an MQTT packet */
|
|
28
|
+
send(data: AnyPacket): Promise<void>;
|
|
29
|
+
/** Close the connection */
|
|
30
|
+
close(): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Read a complete MQTT packet from the connection
|
|
34
|
+
* @param conn Connection to read from
|
|
35
|
+
* @param maxPacketSize Maximum allowed packet size
|
|
36
|
+
* @returns Decoded MQTT packet
|
|
37
|
+
* @throws Error if packet is invalid or too large
|
|
38
|
+
*/
|
|
39
|
+
export declare function readPacket(conn: Conn, maxPacketSize: number): Promise<AnyPacket>;
|
|
40
|
+
/**
|
|
41
|
+
* MQTT Connection class implementing IMqttConn interface
|
|
42
|
+
*/
|
|
43
|
+
export declare class MqttConn implements IMqttConn {
|
|
44
|
+
/** Underlying connection */
|
|
45
|
+
readonly conn: Conn;
|
|
46
|
+
/** Maximum allowed packet size */
|
|
47
|
+
private readonly maxPacketSize;
|
|
48
|
+
/** Reason for connection closure if any */
|
|
49
|
+
private _reason;
|
|
50
|
+
/** Whether connection is closed */
|
|
51
|
+
private _isClosed;
|
|
52
|
+
/**
|
|
53
|
+
* Create new MQTT connection
|
|
54
|
+
* @param options Connection options
|
|
55
|
+
* @param options.conn Underlying socket connection
|
|
56
|
+
* @param options.maxPacketSize Maximum allowed packet size (default 2MB)
|
|
57
|
+
*/
|
|
58
|
+
constructor({ conn, maxPacketSize, }: {
|
|
59
|
+
conn: SockConn;
|
|
60
|
+
maxPacketSize?: number;
|
|
61
|
+
});
|
|
62
|
+
/** Get reason for connection closure */
|
|
63
|
+
get reason(): string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Async iterator for receiving packets
|
|
66
|
+
* @yields MQTT packets
|
|
67
|
+
*/
|
|
68
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<AnyPacket>;
|
|
69
|
+
/**
|
|
70
|
+
* Send an MQTT packet
|
|
71
|
+
* @param data Packet to send
|
|
72
|
+
*/
|
|
73
|
+
send(data: AnyPacket): Promise<void>;
|
|
74
|
+
/** Whether connection is closed */
|
|
75
|
+
get isClosed(): boolean;
|
|
76
|
+
/** Close the connection */
|
|
77
|
+
close(): void;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=mqttConn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mqttConn.d.ts","sourceRoot":"","sources":["../../mqttConn/mqttConn.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,aAAa,CAAC,SAAS,CAAC;IACzD,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,mCAAmC;IACnC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,2CAA2C;IAC3C,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAC3D,0BAA0B;IAC1B,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,2BAA2B;IAC3B,KAAK,IAAI,IAAI,CAAC;CACf;AAgCD;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,SAAS,CAAC,CAmBpB;AAED;;GAEG;AACH,qBAAa,QAAS,YAAW,SAAS;IACxC,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,kCAAkC;IAClC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,2CAA2C;IAC3C,OAAO,CAAC,OAAO,CAAiC;IAChD,mCAAmC;IACnC,OAAO,CAAC,SAAS,CAAS;IAE1B;;;;;OAKG;gBACS,EACV,IAAI,EACJ,aAAa,GACd,EAAE;QACD,IAAI,EAAE,QAAQ,CAAC;QACf,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;IAKD,wCAAwC;IACxC,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED;;;OAGG;IACI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC;IAkBjE;;;OAGG;IACG,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAW1C,mCAAmC;IACnC,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,2BAA2B;IAC3B,KAAK,IAAI,IAAI;CAUd"}
|