@tuya-miniapp/ark-extension-virtual-device 1.6.2-beta-2 → 1.6.2-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-1",
220715
+ version: "1.6.2-beta-2",
220716
220716
  license: "MIT",
220717
220717
  files: [
220718
220718
  "manifest.json",
@@ -264074,6 +264074,7 @@ var MqttClientManager = class _MqttClientManager {
264074
264074
  async function initMqttClient() {
264075
264075
  console.log("---------------initClient");
264076
264076
  const client = await MqttClientManager.init();
264077
+ console.log("---------------initClient success");
264077
264078
  return client;
264078
264079
  }
264079
264080
  var initMqttClient_default = MqttClientManager;
@@ -281972,39 +281973,48 @@ var getInstalledExtList2 = () => {
281972
281973
  var getDebugExt = () => {
281973
281974
  return new Promise((resolve) => {
281974
281975
  ark.storage.get(DEBUG_EXT_STORAGE_KEY).then((value) => {
281975
- let list = null;
281976
- if (value) {
281977
- list = JSON.parse(value);
281976
+ try {
281977
+ let list = null;
281978
+ if (value) {
281979
+ list = JSON.parse(value);
281980
+ }
281981
+ resolve(list);
281982
+ } catch (error) {
281983
+ console.log("getDebugExt error", error);
281978
281984
  }
281979
- resolve(list);
281980
281985
  }).catch((err) => {
281981
281986
  resolve(null);
281982
281987
  });
281983
281988
  });
281984
281989
  };
281985
281990
  async function initPlugin() {
281986
- const installedExt = await getInstalledExtList2();
281987
- const plugins = [...installedExt];
281988
- const debugExt = await getDebugExt();
281989
- if (debugExt) {
281990
- plugins.push(debugExt);
281991
- }
281992
- return Promise.all(
281993
- plugins.map(async (item) => {
281994
- try {
281995
- const p2 = `${item.baseDir}/${item.worker.entry}`;
281996
- if (!!item.worker.initFunc) {
281997
- import(p2);
281998
- } else {
281999
- import(p2);
281991
+ try {
281992
+ const installedExt = await getInstalledExtList2();
281993
+ const plugins = [...installedExt];
281994
+ const debugExt = await getDebugExt();
281995
+ if (debugExt) {
281996
+ plugins.push(debugExt);
281997
+ }
281998
+ return Promise.all(
281999
+ plugins.map(async (item) => {
282000
+ try {
282001
+ const p2 = `${item.baseDir}/${item.worker.entry}`;
282002
+ if (!!item.worker.initFunc) {
282003
+ import(p2);
282004
+ } else {
282005
+ import(p2);
282006
+ }
282007
+ } catch (error) {
282008
+ console.log("\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25", item, error);
282000
282009
  }
282001
- } catch (error) {
282002
- console.log("\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25", item, error);
282003
- }
282004
- })
282005
- ).catch((e2) => {
282006
- console.log("------promise fail", e2);
282007
- });
282010
+ })
282011
+ ).catch((e2) => {
282012
+ console.log("------promise fail", e2);
282013
+ return Promise.reject(e2);
282014
+ });
282015
+ } catch (error) {
282016
+ return Promise.reject(error);
282017
+ }
282008
282018
  }
282009
282019
 
282010
282020
  // worker/utils/debugExtension.ts
@@ -282194,7 +282204,7 @@ try {
282194
282204
  console.log("---------------error", error);
282195
282205
  }
282196
282206
  });
282197
- async function initLaunchParams() {
282207
+ const initLaunchParams = async () => {
282198
282208
  try {
282199
282209
  onUpdateListener && onUpdateListener();
282200
282210
  const status = await ark.auth.checkStatus();
@@ -282231,7 +282241,7 @@ try {
282231
282241
  } catch (error) {
282232
282242
  console.log("---------update", error);
282233
282243
  }
282234
- }
282244
+ };
282235
282245
  isInstanceMode7 && ark.project.setCompilationParams({ params: `deviceId=123` });
282236
282246
  ark.auth.onAuthed(async (env) => {
282237
282247
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/ark-extension-virtual-device",
3
- "version": "1.6.2-beta-2",
3
+ "version": "1.6.2-beta-3",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "manifest.json",