@tuya-sat/sdf-main-sdk 6.2.49 → 6.2.51
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/{364.c1fc42f3.chunk.js → 364.d8cacf87.chunk.js} +1 -1
- package/dist/{364.c1fc42f3.chunk.js.map → 364.d8cacf87.chunk.js.map} +1 -1
- package/dist/main.bundle.js +1 -1
- package/dist/main.bundle.js.map +1 -1
- package/dist/manifest.json +2 -2
- package/dist/mqtt/index.d.ts +4 -2
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main.css": "auto/main.css",
|
|
3
3
|
"main.js": "auto/main.bundle.js",
|
|
4
|
-
"364.
|
|
4
|
+
"364.d8cacf87.chunk.js": "auto/364.d8cacf87.chunk.js",
|
|
5
5
|
"static/img/login3.png": "auto/static/img/dd06d35d98047203e715.png",
|
|
6
6
|
"static/img/reLogin.png": "auto/static/img/294142da390c5af23324.png",
|
|
7
7
|
"static/img/login2.png": "auto/static/img/47a523d0027c7b5af83f.png",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"static/img/tuya.png": "auto/static/img/328d8b5c342b13933c5c.png",
|
|
24
24
|
"main.css.map": "auto/main.css.map",
|
|
25
25
|
"main.bundle.js.map": "auto/main.bundle.js.map",
|
|
26
|
-
"364.
|
|
26
|
+
"364.d8cacf87.chunk.js.map": "auto/364.d8cacf87.chunk.js.map"
|
|
27
27
|
}
|
package/dist/mqtt/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface SubscribeTopicOption {
|
|
2
|
-
/** 为 true
|
|
2
|
+
/** 为 true 时卸载微应用不会随 unsubscribeMicTopics 一起取消 */
|
|
3
3
|
isGlobal?: boolean;
|
|
4
4
|
/** 与 topic 一一对应;不传则仅按 topic 匹配,不校验 protocol */
|
|
5
5
|
protocol?: number;
|
|
@@ -19,6 +19,8 @@ export interface PublishTopicOption {
|
|
|
19
19
|
isRaw?: boolean;
|
|
20
20
|
}
|
|
21
21
|
export type MqttTopic = string | ((uid: string) => string);
|
|
22
|
+
/** 一次 subscribeTopic 调用对应的专属退订函数 */
|
|
23
|
+
export type MqttSubscriptionDisposer = () => void;
|
|
22
24
|
export type MqttStatus = 'connected' | 'reconnecting' | 'recovering' | 'reconnect_failed' | 'offline' | 'close' | 'error';
|
|
23
25
|
export interface MqttStatusEvent {
|
|
24
26
|
status: MqttStatus;
|
|
@@ -33,7 +35,7 @@ export interface MqttStatusChangeOption {
|
|
|
33
35
|
export type MqttStatusListener = (event: MqttStatusEvent) => void;
|
|
34
36
|
declare const mqtt: {
|
|
35
37
|
init: (cb?: () => void, force?: boolean) => Promise<void>;
|
|
36
|
-
subscribeTopic: (topic: MqttTopic, cbFn?: (msg: any) => void, option?: SubscribeTopicOption) =>
|
|
38
|
+
subscribeTopic: (topic: MqttTopic, cbFn?: (msg: any) => void, option?: SubscribeTopicOption) => MqttSubscriptionDisposer;
|
|
37
39
|
publishTopic: (topic: MqttTopic, data: any, option?: PublishTopicOption) => Promise<void>;
|
|
38
40
|
unsubscribeMicTopics: () => void;
|
|
39
41
|
unsubscribeTopic: (topic?: MqttTopic) => void;
|