@tuya-miniapp/ark-extension-virtual-device 1.7.0-beta-1 → 1.7.0-beta-3

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.
@@ -220712,7 +220712,7 @@ var require_package2 = __commonJS({
220712
220712
  "package.json"(exports, module2) {
220713
220713
  module2.exports = {
220714
220714
  name: "@tuya-miniapp/ark-extension-virtual-device",
220715
- version: "1.6.2-beta-8",
220715
+ version: "1.7.0-beta-1",
220716
220716
  license: "MIT",
220717
220717
  files: [
220718
220718
  "manifest.json",
@@ -262488,21 +262488,31 @@ var import_path = require("path");
262488
262488
 
262489
262489
  // worker/api/services/getTuyaProjectInfo.ts
262490
262490
  var getTuyaProjectInfo = async () => {
262491
- const json = await readProjectConfigJson();
262492
- const mode = await getDebugMode();
262493
- if (mode === "real") {
262494
- const deviceId = await getDeviceId();
262495
- const productId = await getProductId();
262496
- if (deviceId)
262497
- json.deviceId = await getDeviceId();
262498
- if (productId)
262499
- json.productId = await getProductId();
262500
- } else if (mode === "group") {
262501
- const groupId = await getGroupId();
262502
- if (groupId)
262503
- json.groupId = await getGroupId();
262491
+ try {
262492
+ const json = await readProjectConfigJson();
262493
+ console.log("-----readProjectConfigJson", json);
262494
+ const mode = await getDebugMode();
262495
+ console.log("-----getDebugMode", mode);
262496
+ if (mode === "real") {
262497
+ const deviceId = await getDeviceId();
262498
+ console.log("-----getDeviceId", deviceId);
262499
+ const productId = await getProductId();
262500
+ console.log("-----getProductId", productId);
262501
+ if (deviceId)
262502
+ json.deviceId = deviceId;
262503
+ if (productId)
262504
+ json.productId = productId;
262505
+ } else if (mode === "group") {
262506
+ const groupId = await getGroupId();
262507
+ if (groupId)
262508
+ json.groupId = await getGroupId();
262509
+ }
262510
+ console.log("-----getTuyaProjectInfo return ", json);
262511
+ return json;
262512
+ } catch (error) {
262513
+ console.log("getTuyaProjectInfo error", error);
262514
+ return null;
262504
262515
  }
262505
- return json;
262506
262516
  };
262507
262517
  var getEnvInfo = async () => {
262508
262518
  const u2 = await ark.auth.getCustomerUserInfo();
@@ -263864,13 +263874,6 @@ var MqttClientManager = class _MqttClientManager {
263864
263874
  });
263865
263875
  });
263866
263876
  global.__mqttClient = client;
263867
- console.log("--------------mqtt client-------------------");
263868
- console.log(
263869
- global.__mqttClient.version,
263870
- global.__mqttClient.connected,
263871
- global.__mqttClient.options
263872
- );
263873
- console.log("--------------mqtt client-------------------");
263874
263877
  return client;
263875
263878
  }
263876
263879
  // destroy() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/ark-extension-virtual-device",
3
- "version": "1.7.0-beta-1",
3
+ "version": "1.7.0-beta-3",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "manifest.json",