@tuya-miniapp/ark-extension-virtual-device 1.3.0-beta-3 → 1.3.0-beta-4
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 +16 -5
- package/package.json +1 -1
package/dist/worker/index.js
CHANGED
|
@@ -210199,7 +210199,7 @@ var require_package = __commonJS({
|
|
|
210199
210199
|
"package.json"(exports, module2) {
|
|
210200
210200
|
module2.exports = {
|
|
210201
210201
|
name: "@tuya-miniapp/ark-extension-virtual-device",
|
|
210202
|
-
version: "1.3.0-beta-
|
|
210202
|
+
version: "1.3.0-beta-3",
|
|
210203
210203
|
license: "MIT",
|
|
210204
210204
|
files: [
|
|
210205
210205
|
"manifest.json",
|
|
@@ -251966,17 +251966,27 @@ var setDebugMode = async ({ mode }) => {
|
|
|
251966
251966
|
await setCompilationParams({ deviceId });
|
|
251967
251967
|
} else {
|
|
251968
251968
|
const groupId = await getGroupId();
|
|
251969
|
-
await setCompilationParams({ groupId
|
|
251969
|
+
await setCompilationParams({ groupId: groupId ?? "" });
|
|
251970
251970
|
}
|
|
251971
251971
|
return mode;
|
|
251972
251972
|
};
|
|
251973
251973
|
var setCompilationParams = async (p2) => {
|
|
251974
251974
|
const { page, params } = await ark.project.getCompilationParams() || {};
|
|
251975
|
+
const mode = await getDebugMode();
|
|
251975
251976
|
let debugParams = parseSearchParams(params);
|
|
251976
|
-
const
|
|
251977
|
+
const realParams = {};
|
|
251978
|
+
Object.keys(debugParams).map((key) => {
|
|
251979
|
+
if (!!debugParams[key] && debugParams[key] !== "undefined") {
|
|
251980
|
+
realParams[key] - debugParams[key];
|
|
251981
|
+
}
|
|
251982
|
+
});
|
|
251983
|
+
if (mode !== "group") {
|
|
251984
|
+
delete realParams["groupId"];
|
|
251985
|
+
}
|
|
251986
|
+
const np = stringifySearchParams({ ...realParams, ...p2 });
|
|
251977
251987
|
ark.project.setCompilationParams({ page, params: np });
|
|
251978
251988
|
console.log("---------------setCompilationParams-----------------------");
|
|
251979
|
-
console.log(params, p2);
|
|
251989
|
+
console.log(params, np, p2);
|
|
251980
251990
|
console.log("---------------setCompilationParams-----------------------");
|
|
251981
251991
|
};
|
|
251982
251992
|
|
|
@@ -268318,7 +268328,8 @@ async function initLaunchParams() {
|
|
|
268318
268328
|
console.log("to getProjectDeviceId");
|
|
268319
268329
|
let deviceId = await services_default.getProjectDeviceId();
|
|
268320
268330
|
const groupId = await services_default.getGroupId();
|
|
268321
|
-
|
|
268331
|
+
const mode = await services_default.getDebugMode();
|
|
268332
|
+
if (groupId && mode === "group") {
|
|
268322
268333
|
await getGroupInfo({ groupId });
|
|
268323
268334
|
deviceId = groupId;
|
|
268324
268335
|
}
|