mirror of
https://github.com/esphome/esp-web-tools.git
synced 2025-07-25 20:56:43 +00:00
Use latest web flasher
This commit is contained in:
parent
7cf91fa76b
commit
a8dfa54dd5
19
package-lock.json
generated
19
package-lock.json
generated
@ -1,18 +1,19 @@
|
||||
{
|
||||
"name": "esp-web-tools",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "0.0.1",
|
||||
"name": "esp-web-tools",
|
||||
"version": "1.0.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@material/mwc-button": "^0.21.0",
|
||||
"@material/mwc-circular-progress": "^0.21.0",
|
||||
"@material/mwc-dialog": "^0.21.0",
|
||||
"@material/mwc-textfield": "^0.21.0",
|
||||
"esp-web-flasher": "^1.0.0",
|
||||
"esp-web-flasher": "^1.0.3",
|
||||
"lit": "^2.0.0-rc.2",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
@ -793,9 +794,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esp-web-flasher": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/esp-web-flasher/-/esp-web-flasher-1.0.0.tgz",
|
||||
"integrity": "sha512-WzmO/LQJEgeddwoFAb4GI/cDia/r80Le1iMvHNMGetscQXvQGeV7HRkmWlr3e4BBYxAgtA8Zi86GLfdh8qG8YA==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/esp-web-flasher/-/esp-web-flasher-1.0.3.tgz",
|
||||
"integrity": "sha512-3X1z0/KL4NYm61oWTzH3fV4e4FXcgYJwRk+TdYLMuvyeqm4FB0v2bo8ZfClzJ+PJx2laGVTZ5RGPBhqt7Q8/bA==",
|
||||
"dependencies": {
|
||||
"tslib": "^2.2.0"
|
||||
}
|
||||
@ -2147,9 +2148,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"esp-web-flasher": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/esp-web-flasher/-/esp-web-flasher-1.0.0.tgz",
|
||||
"integrity": "sha512-WzmO/LQJEgeddwoFAb4GI/cDia/r80Le1iMvHNMGetscQXvQGeV7HRkmWlr3e4BBYxAgtA8Zi86GLfdh8qG8YA==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/esp-web-flasher/-/esp-web-flasher-1.0.3.tgz",
|
||||
"integrity": "sha512-3X1z0/KL4NYm61oWTzH3fV4e4FXcgYJwRk+TdYLMuvyeqm4FB0v2bo8ZfClzJ+PJx2laGVTZ5RGPBhqt7Q8/bA==",
|
||||
"requires": {
|
||||
"tslib": "^2.2.0"
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
"@material/mwc-circular-progress": "^0.21.0",
|
||||
"@material/mwc-dialog": "^0.21.0",
|
||||
"@material/mwc-textfield": "^0.21.0",
|
||||
"esp-web-flasher": "^1.0.0",
|
||||
"esp-web-flasher": "^1.0.3",
|
||||
"lit": "^2.0.0-rc.2",
|
||||
"tslib": "^2.2.0"
|
||||
}
|
||||
|
14
src/const.ts
14
src/const.ts
@ -1,17 +1,3 @@
|
||||
import { connect } from "esp-web-flasher";
|
||||
|
||||
type AsyncReturnType<T extends (...args: any) => any> = T extends (
|
||||
...args: any
|
||||
) => Promise<infer U>
|
||||
? U
|
||||
: T extends (...args: any) => infer U
|
||||
? U
|
||||
: any;
|
||||
|
||||
// Waiting for esp-web-flash >1.0.0 release which will include this type
|
||||
export type ESPLoader = AsyncReturnType<typeof connect>;
|
||||
export type Logger = Parameters<typeof connect>[0];
|
||||
|
||||
export interface Build {
|
||||
chipFamily: "ESP32" | "ESP8266";
|
||||
improv: boolean;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { html } from "lit";
|
||||
import { connect } from "esp-web-flasher";
|
||||
import { Build, ESPLoader, Manifest, Logger } from "./const";
|
||||
import { connect, ESPLoader, Logger } from "esp-web-flasher";
|
||||
import { Build, Manifest } from "./const";
|
||||
import "./flash-log";
|
||||
import { getChipFamilyName, sleep } from "./util";
|
||||
|
||||
|
@ -2,8 +2,8 @@ import {
|
||||
CHIP_FAMILY_ESP32,
|
||||
CHIP_FAMILY_ESP32S2,
|
||||
CHIP_FAMILY_ESP8266,
|
||||
ESPLoader,
|
||||
} from "esp-web-flasher";
|
||||
import { ESPLoader } from "./const";
|
||||
|
||||
export const getChipFamilyName = (esploader: ESPLoader) => {
|
||||
switch (esploader.chipFamily) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user