tasmota-esp-web-tools 12.1.1 → 12.1.2

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.
@@ -105,7 +105,7 @@ let EwtLittleFSManager = class EwtLittleFSManager extends LitElement {
105
105
  this.logger.log(`Successfully mounted LittleFS with block size ${bs}`);
106
106
  break;
107
107
  }
108
- catch (err) {
108
+ catch (_err) {
109
109
  // Try next block size
110
110
  fs = null;
111
111
  }
@@ -125,7 +125,7 @@ let EwtLittleFSManager = class EwtLittleFSManager extends LitElement {
125
125
  this._diskVersion = "Unknown";
126
126
  }
127
127
  }
128
- catch (e) {
128
+ catch (_e) {
129
129
  this._diskVersion = "Unknown";
130
130
  }
131
131
  this._refreshFiles();
@@ -238,7 +238,7 @@ let EwtLittleFSManager = class EwtLittleFSManager extends LitElement {
238
238
  try {
239
239
  this._fs.mkdir(built);
240
240
  }
241
- catch (e) {
241
+ catch (_e) {
242
242
  // Ignore if directory already exists
243
243
  }
244
244
  }
@@ -397,12 +397,7 @@ let EwtLittleFSManager = class EwtLittleFSManager extends LitElement {
397
397
  }
398
398
  _cleanup() {
399
399
  if (this._fs) {
400
- try {
401
- // Don't call destroy() - just let garbage collection handle it
402
- }
403
- catch (e) {
404
- console.error("Error cleaning up LittleFS:", e);
405
- }
400
+ // Don't call destroy() - just let garbage collection handle it
406
401
  this._fs = null;
407
402
  }
408
403
  }
package/dist/connect.js CHANGED
@@ -85,7 +85,7 @@ export const connect = async (button) => {
85
85
  try {
86
86
  await esploader.disconnect();
87
87
  }
88
- catch (err) {
88
+ catch (_err) {
89
89
  // Ignore disconnect errors
90
90
  }
91
91
  }, { once: true });
package/dist/flash.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Logger } from "tasmota-webserial-esptool";
2
2
  import { FlashState } from "./const";
3
3
  export declare const flash: (onEvent: (state: FlashState) => void, esploader: any, // ESPLoader instance from tasmota-webserial-esptool
4
- logger: Logger, manifestPath: string, eraseFirst: boolean, firmwareBuffer: Uint8Array, baudRate?: number) => Promise<void>;
4
+ logger: Logger, manifestPath: string, eraseFirst: boolean, firmwareBuffer: Uint8Array, _baudRate?: number) => Promise<void>;
package/dist/flash.js CHANGED
@@ -2,7 +2,7 @@ import { getChipFamilyName } from "./util/chip-family-name";
2
2
  import { sleep } from "./util/sleep";
3
3
  import { corsProxyFetch } from "./util/cors-proxy";
4
4
  export const flash = async (onEvent, esploader, // ESPLoader instance from tasmota-webserial-esptool
5
- logger, manifestPath, eraseFirst, firmwareBuffer, baudRate) => {
5
+ logger, manifestPath, eraseFirst, firmwareBuffer, _baudRate) => {
6
6
  let manifest;
7
7
  let build;
8
8
  let chipFamily;
@@ -14,8 +14,8 @@ logger, manifestPath, eraseFirst, firmwareBuffer, baudRate) => {
14
14
  chipFamily,
15
15
  chipVariant,
16
16
  });
17
- var manifestProm = null;
18
- var manifestURL = "";
17
+ let manifestProm = null;
18
+ let manifestURL = "";
19
19
  try {
20
20
  manifestProm = JSON.parse(manifestPath);
21
21
  }
@@ -198,7 +198,7 @@ logger, manifestPath, eraseFirst, firmwareBuffer, baudRate) => {
198
198
  for (let i = 0; i < build.parts.length; i++) {
199
199
  const part = build.parts[i];
200
200
  const data = files[i];
201
- await espStub.flashData(data, (bytesWritten, bytesTotal) => {
201
+ await espStub.flashData(data, (bytesWritten, _bytesTotal) => {
202
202
  const newPct = Math.floor(((totalBytesWritten + bytesWritten) / totalSize) * 100);
203
203
  if (newPct === lastPct) {
204
204
  return;
@@ -505,8 +505,8 @@ export class EwtInstallDialog extends LitElement {
505
505
  _renderDashboard() {
506
506
  const heading = this._info.name;
507
507
  let content;
508
- let hideActions = true;
509
- let allowClosing = true;
508
+ const hideActions = true;
509
+ const allowClosing = true;
510
510
  content = html `
511
511
  <ew-list>
512
512
  <ew-list-item>
@@ -828,8 +828,8 @@ export class EwtInstallDialog extends LitElement {
828
828
  _renderDashboardNoImprov() {
829
829
  const heading = "Device Dashboard";
830
830
  let content;
831
- let hideActions = true;
832
- let allowClosing = true;
831
+ const hideActions = true;
832
+ const allowClosing = true;
833
833
  content = html `
834
834
  <ew-list>
835
835
  <ew-list-item
@@ -1099,8 +1099,8 @@ export class EwtInstallDialog extends LitElement {
1099
1099
  case 3 /* ImprovSerialErrorState.UNABLE_TO_CONNECT */:
1100
1100
  error = "Unable to connect";
1101
1101
  break;
1102
+ // UNKNOWN_RPC_COMMAND happens when list SSIDs not supported.
1102
1103
  case 0 /* ImprovSerialErrorState.NO_ERROR */:
1103
- // Happens when list SSIDs not supported.
1104
1104
  case 2 /* ImprovSerialErrorState.UNKNOWN_RPC_COMMAND */:
1105
1105
  break;
1106
1106
  default:
@@ -1354,9 +1354,9 @@ export class EwtInstallDialog extends LitElement {
1354
1354
  return [heading, content, hideActions, allowClosing];
1355
1355
  }
1356
1356
  _renderLogs() {
1357
- let heading = `Logs`;
1357
+ const heading = `Logs`;
1358
1358
  let content;
1359
- let hideActions = false;
1359
+ const hideActions = false;
1360
1360
  content = html `
1361
1361
  <ew-console
1362
1362
  .port=${this._port}
@@ -1632,7 +1632,7 @@ export class EwtInstallDialog extends LitElement {
1632
1632
  try {
1633
1633
  ssids = await this._client.scan();
1634
1634
  }
1635
- catch (err) {
1635
+ catch (_err) {
1636
1636
  // When we fail while loading, pick "Join other"
1637
1637
  if (this._ssids === undefined) {
1638
1638
  this._ssids = null;
@@ -1720,7 +1720,7 @@ export class EwtInstallDialog extends LitElement {
1720
1720
  try {
1721
1721
  this._manifest = await downloadManifest(this.manifestPath);
1722
1722
  }
1723
- catch (err) {
1723
+ catch (_err) {
1724
1724
  this._state = "ERROR";
1725
1725
  this._error = "Failed to download manifest";
1726
1726
  this._busy = false;
@@ -2094,7 +2094,7 @@ export class EwtInstallDialog extends LitElement {
2094
2094
  try {
2095
2095
  await this._client.provision(ssid, password);
2096
2096
  }
2097
- catch (err) {
2097
+ catch (_err) {
2098
2098
  return;
2099
2099
  }
2100
2100
  finally {
@@ -32,7 +32,7 @@ export const corsProxyFetch = async (url, options) => {
32
32
  // GitHub releases don't support CORS, use proxy directly
33
33
  if (url.includes("github.com") && url.includes("/releases/download/")) {
34
34
  const proxiedUrl = `${CORS_PROXY}/?url=${encodeURIComponent(url)}`;
35
- const { headers, credentials, ...safeOptions } = options !== null && options !== void 0 ? options : {};
35
+ const { headers: _headers, credentials: _credentials, ...safeOptions } = options !== null && options !== void 0 ? options : {};
36
36
  return fetch(proxiedUrl, safeOptions);
37
37
  }
38
38
  // Try direct fetch first for other cross-origin requests
@@ -44,10 +44,10 @@ export const corsProxyFetch = async (url, options) => {
44
44
  // Direct fetch failed, try proxy
45
45
  try {
46
46
  const proxiedUrl = `${CORS_PROXY}/?url=${encodeURIComponent(url)}`;
47
- const { headers, credentials, ...safeOptions } = options !== null && options !== void 0 ? options : {};
47
+ const { headers: _headers, credentials: _credentials, ...safeOptions } = options !== null && options !== void 0 ? options : {};
48
48
  return await fetch(proxiedUrl, safeOptions);
49
49
  }
50
- catch (proxyError) {
50
+ catch (_proxyError) {
51
51
  // Both failed, throw the original error
52
52
  throw directError;
53
53
  }
@@ -35,7 +35,7 @@ export async function detectFilesystemType(espStub, offset, size, logger = conso
35
35
  }
36
36
  }
37
37
  }
38
- catch (e) {
38
+ catch (_e) {
39
39
  // Continue checking other methods
40
40
  }
41
41
  }