@tuya-miniapp/ark-extension-virtual-device 1.8.7-beta-1 → 1.8.7-beta-2
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/worker/index.js +57 -50
- package/package.json +1 -1
package/dist/worker/index.js
CHANGED
|
@@ -220752,7 +220752,7 @@ var require_package2 = __commonJS({
|
|
|
220752
220752
|
"package.json"(exports, module2) {
|
|
220753
220753
|
module2.exports = {
|
|
220754
220754
|
name: "@tuya-miniapp/ark-extension-virtual-device",
|
|
220755
|
-
version: "1.8.
|
|
220755
|
+
version: "1.8.7-beta-1",
|
|
220756
220756
|
license: "MIT",
|
|
220757
220757
|
files: [
|
|
220758
220758
|
"manifest.json",
|
|
@@ -282067,59 +282067,66 @@ async function syncTimerTask(params) {
|
|
|
282067
282067
|
};
|
|
282068
282068
|
}
|
|
282069
282069
|
}
|
|
282070
|
-
|
|
282071
|
-
|
|
282072
|
-
|
|
282073
|
-
|
|
282074
|
-
|
|
282075
|
-
|
|
282070
|
+
try {
|
|
282071
|
+
const data = await apiRequestByAtop({
|
|
282072
|
+
api: "tuya.m.clock.dps.list",
|
|
282073
|
+
version: "2.0",
|
|
282074
|
+
params: {
|
|
282075
|
+
bizId: deviceId || groupId,
|
|
282076
|
+
bizType: deviceId ? 0 : 1
|
|
282077
|
+
}
|
|
282078
|
+
});
|
|
282079
|
+
const list = [];
|
|
282080
|
+
const parseTimer = (item) => {
|
|
282081
|
+
const {
|
|
282082
|
+
aliasName,
|
|
282083
|
+
date,
|
|
282084
|
+
dps,
|
|
282085
|
+
id,
|
|
282086
|
+
isAppPush,
|
|
282087
|
+
loops,
|
|
282088
|
+
status,
|
|
282089
|
+
time,
|
|
282090
|
+
timezoneId,
|
|
282091
|
+
groupOrder
|
|
282092
|
+
} = item;
|
|
282093
|
+
return {
|
|
282094
|
+
aliasName,
|
|
282095
|
+
date,
|
|
282096
|
+
dps: JSON.parse(dps),
|
|
282097
|
+
id: `${id}`,
|
|
282098
|
+
isAppPush,
|
|
282099
|
+
loops,
|
|
282100
|
+
status: !!status,
|
|
282101
|
+
time,
|
|
282102
|
+
timerId: `${id}`,
|
|
282103
|
+
timezoneId
|
|
282104
|
+
};
|
|
282105
|
+
};
|
|
282106
|
+
if (!!category) {
|
|
282107
|
+
data.result?.filter((l2) => l2.category === category).map((cate) => {
|
|
282108
|
+
const { timers } = cate;
|
|
282109
|
+
const t2 = timers.map(parseTimer);
|
|
282110
|
+
list.push(...t2);
|
|
282111
|
+
});
|
|
282112
|
+
} else {
|
|
282113
|
+
data.result?.map((cate) => {
|
|
282114
|
+
const { timers } = cate;
|
|
282115
|
+
const t2 = timers.map(parseTimer);
|
|
282116
|
+
list.push(...t2);
|
|
282117
|
+
});
|
|
282076
282118
|
}
|
|
282077
|
-
});
|
|
282078
|
-
const list = [];
|
|
282079
|
-
const parseTimer = (item) => {
|
|
282080
|
-
const {
|
|
282081
|
-
aliasName,
|
|
282082
|
-
date,
|
|
282083
|
-
dps,
|
|
282084
|
-
id,
|
|
282085
|
-
isAppPush,
|
|
282086
|
-
loops,
|
|
282087
|
-
status,
|
|
282088
|
-
time,
|
|
282089
|
-
timezoneId,
|
|
282090
|
-
groupOrder
|
|
282091
|
-
} = item;
|
|
282092
282119
|
return {
|
|
282093
|
-
|
|
282094
|
-
|
|
282095
|
-
|
|
282096
|
-
|
|
282097
|
-
|
|
282098
|
-
|
|
282099
|
-
|
|
282100
|
-
|
|
282101
|
-
timerId: `${id}`,
|
|
282102
|
-
timezoneId
|
|
282120
|
+
data: { timers: list },
|
|
282121
|
+
errorCode: 0,
|
|
282122
|
+
errorMsg: import_TYUniCode11.TYUniPluginError.SUCCESS.des
|
|
282123
|
+
};
|
|
282124
|
+
} catch (error) {
|
|
282125
|
+
return {
|
|
282126
|
+
errorCode: -1,
|
|
282127
|
+
errorMsg: import_TYUniCode11.TYUniPluginError.INTERNAL_ERROR.des
|
|
282103
282128
|
};
|
|
282104
|
-
};
|
|
282105
|
-
if (!!category) {
|
|
282106
|
-
data.result?.filter((l2) => l2.category === category).map((cate) => {
|
|
282107
|
-
const { timers } = cate;
|
|
282108
|
-
const t2 = timers.map(parseTimer);
|
|
282109
|
-
list.push(...t2);
|
|
282110
|
-
});
|
|
282111
|
-
} else {
|
|
282112
|
-
data.result?.map((cate) => {
|
|
282113
|
-
const { timers } = cate;
|
|
282114
|
-
const t2 = timers.map(parseTimer);
|
|
282115
|
-
list.push(...t2);
|
|
282116
|
-
});
|
|
282117
282129
|
}
|
|
282118
|
-
return {
|
|
282119
|
-
data: { timers: list },
|
|
282120
|
-
errorCode: 0,
|
|
282121
|
-
errorMsg: import_TYUniCode11.TYUniPluginError.SUCCESS.des
|
|
282122
|
-
};
|
|
282123
282130
|
}
|
|
282124
282131
|
async function checkOTAUpdateInfo(params) {
|
|
282125
282132
|
const { deviceId } = params;
|