@tuya-miniapp/ark-extension-virtual-device 1.1.21 → 1.1.22

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.
@@ -173238,7 +173238,7 @@ var require_package = __commonJS({
173238
173238
  "package.json"(exports, module2) {
173239
173239
  module2.exports = {
173240
173240
  name: "@tuya-miniapp/ark-extension-virtual-device",
173241
- version: "1.1.21-beta-13",
173241
+ version: "1.1.22-beta-1",
173242
173242
  files: [
173243
173243
  "manifest.json",
173244
173244
  "package.json",
@@ -175451,15 +175451,8 @@ var DpMqttManager = class {
175451
175451
  getClient() {
175452
175452
  return this._client;
175453
175453
  }
175454
- removeClient() {
175455
- return this._client = null;
175456
- }
175457
175454
  async init() {
175458
- const _client = this.getClient();
175459
- if (_client) {
175460
- this.removeClient();
175461
- }
175462
- ;
175455
+ this.destroy();
175463
175456
  const deviceId = await services_default.getProjectDeviceId();
175464
175457
  ;
175465
175458
  if (!deviceId)
@@ -175516,6 +175509,7 @@ var DpMqttManager = class {
175516
175509
  }
175517
175510
  destroy() {
175518
175511
  this._client && this._client.end();
175512
+ this._client = null;
175519
175513
  }
175520
175514
  };
175521
175515
 
@@ -176381,7 +176375,6 @@ async function initLaunchParams() {
176381
176375
  const status = await ark.auth.checkStatus();
176382
176376
  if (status !== "authorized")
176383
176377
  return;
176384
- initMqtt();
176385
176378
  let deviceId = await services_default.getProjectDeviceId();
176386
176379
  if (deviceId) {
176387
176380
  await getLangContent({});
@@ -176396,6 +176389,7 @@ async function initLaunchParams() {
176396
176389
  await services_default.setCompilationParams({ deviceId });
176397
176390
  }
176398
176391
  }
176392
+ await initMqtt();
176399
176393
  }
176400
176394
  }
176401
176395
  !isInstanceMode7 && initLaunchParams();
@@ -176418,7 +176412,6 @@ var reInit = async () => {
176418
176412
  }
176419
176413
  }
176420
176414
  await initLaunchParams();
176421
- await initMqtt();
176422
176415
  ark.utils.reload();
176423
176416
  };
176424
176417
  ark.auth.onAuthed(async (env) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/ark-extension-virtual-device",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "files": [
5
5
  "manifest.json",
6
6
  "package.json",