zwave-js 15.0.1 → 15.0.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.
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "15.0.1";
1
+ export declare const PACKAGE_VERSION = "15.0.3";
2
2
  export declare const PACKAGE_NAME = "zwave-js";
3
3
  //# sourceMappingURL=_version.d.ts.map
@@ -22,7 +22,7 @@ __export(version_exports, {
22
22
  PACKAGE_VERSION: () => PACKAGE_VERSION
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- const PACKAGE_VERSION = "15.0.1";
25
+ const PACKAGE_VERSION = "15.0.3";
26
26
  const PACKAGE_NAME = "zwave-js";
27
27
  // Annotate the CommonJS export names for ESM import in node:
28
28
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/_version.ts"],
4
- "sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.0.1\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
4
+ "sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.0.3\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;;;;;;AACO,MAAM,kBAAkB;AACxB,MAAM,eAAe;",
6
6
  "names": []
7
7
  }
@@ -845,9 +845,9 @@ class Driver extends import_shared.TypedEventTarget {
845
845
  } catch (e) {
846
846
  let message;
847
847
  if (/\.yarn[/\\]cache[/\\]zwave-js/i.test((0, import_shared.getErrorMessage)(e, true))) {
848
- message = `Failed to create the cache directory. When using Yarn PnP, you need to change the location with the "storage.cacheDir" driver option.`;
848
+ message = `Failed to create the cache directory ${this.cacheDir}. When using Yarn PnP, you need to change the location with the "storage.cacheDir" driver option.`;
849
849
  } else {
850
- message = `Failed to create the cache directory. Please make sure that it is writable or change the location with the "storage.cacheDir" driver option.`;
850
+ message = `Failed to create the cache directory ${this.cacheDir}. Please make sure that it is writable or change the location with the "storage.cacheDir" driver option.`;
851
851
  }
852
852
  void this.destroyWithMessage(message);
853
853
  return;
@@ -3571,13 +3571,20 @@ ${handlers.length} left`);
3571
3571
  async drainSerialAPIQueue() {
3572
3572
  for await (const item of this.serialAPIQueue) {
3573
3573
  const { msg, transactionSource, result } = item;
3574
- try {
3575
- const ret = await this.executeSerialAPICommand(msg, transactionSource);
3576
- result.resolve(ret);
3577
- } catch (e) {
3578
- result.reject(e);
3579
- } finally {
3580
- this._currentSerialAPICommandPromise = void 0;
3574
+ attempts: for (let attempt = 1; ; attempt++) {
3575
+ try {
3576
+ const ret = await this.executeSerialAPICommand(msg, transactionSource);
3577
+ result.resolve(ret);
3578
+ } catch (e) {
3579
+ if ((0, import_core.isZWaveError)(e) && e.code === import_core.ZWaveErrorCodes.Controller_MessageDropped && e.context === "CAN" && attempt < 3) {
3580
+ await (0, import_async.wait)(100);
3581
+ continue;
3582
+ }
3583
+ result.reject(e);
3584
+ } finally {
3585
+ this._currentSerialAPICommandPromise = void 0;
3586
+ }
3587
+ break attempts;
3581
3588
  }
3582
3589
  }
3583
3590
  }