ota-hub-reactjs 0.0.4 → 0.0.6
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.
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/message_layers/protobuf-wrapper.d.ts +2 -2
- package/dist/transport_layers/serial-device-whisperer.d.ts +2 -2
- package/dist/transport_layers/serial-device-whisperer.js +1 -1
- package/dist/transport_layers/websocket-device-whisperer.d.ts +2 -2
- package/dist/transport_layers/websocket-device-whisperer.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "
|
|
2
|
-
export * from "
|
|
3
|
-
export * from "
|
|
4
|
-
export * from "
|
|
1
|
+
export * from "./base/device-whisperer.js";
|
|
2
|
+
export * from "./message_layers/protobuf-wrapper.js";
|
|
3
|
+
export * from "./transport_layers/serial-device-whisperer.js";
|
|
4
|
+
export * from "./transport_layers/websocket-device-whisperer.js";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Re-export core types/classes
|
|
2
|
-
export * from "
|
|
2
|
+
export * from "./base/device-whisperer.js";
|
|
3
3
|
// Message layer exports
|
|
4
|
-
export * from "
|
|
4
|
+
export * from "./message_layers/protobuf-wrapper.js";
|
|
5
5
|
// Transport layers
|
|
6
|
-
export * from "
|
|
7
|
-
export * from "
|
|
6
|
+
export * from "./transport_layers/serial-device-whisperer.js";
|
|
7
|
+
export * from "./transport_layers/websocket-device-whisperer.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddConnectionProps, DeviceConnectionState, MultiDeviceWhisperer } from "
|
|
1
|
+
import { AddConnectionProps, DeviceConnectionState, MultiDeviceWhisperer } from "../base/device-whisperer.js";
|
|
2
2
|
export type TopicHandlerContext<AppLayer extends DeviceConnectionState> = {
|
|
3
3
|
base: ReturnType<typeof MultiDeviceWhisperer<AppLayer>>;
|
|
4
4
|
uuid: string;
|
|
@@ -27,5 +27,5 @@ export declare function ProtobufMultiDeviceWhisperer<AppLayer extends DeviceConn
|
|
|
27
27
|
updateConnection: (uuid: string, updater: (c: AppLayer) => AppLayer) => void;
|
|
28
28
|
reconnectAll: () => void;
|
|
29
29
|
updateConnectionName: (uuid: string, name: string) => void;
|
|
30
|
-
appendLog: (uuid: string, log: import("
|
|
30
|
+
appendLog: (uuid: string, log: import("../base/device-whisperer.js").LogLine) => void;
|
|
31
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FlashOptions, Transport } from "esptool-js";
|
|
2
|
-
import { DeviceConnectionState, AddConnectionProps } from "
|
|
2
|
+
import { DeviceConnectionState, AddConnectionProps } from "../base/device-whisperer.js";
|
|
3
3
|
export type SerialConnectionState = DeviceConnectionState & {
|
|
4
4
|
port?: SerialPort;
|
|
5
5
|
baudrate?: number;
|
|
@@ -27,5 +27,5 @@ export declare function SerialMultiDeviceWhisperer<AppOrMessageLayer extends Ser
|
|
|
27
27
|
connectionsRef: import("react").RefObject<AppOrMessageLayer[]>;
|
|
28
28
|
updateConnection: (uuid: string, updater: (c: AppOrMessageLayer) => AppOrMessageLayer) => void;
|
|
29
29
|
updateConnectionName: (uuid: string, name: string) => void;
|
|
30
|
-
appendLog: (uuid: string, log: import("
|
|
30
|
+
appendLog: (uuid: string, log: import("../base/device-whisperer.js").LogLine) => void;
|
|
31
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ESPLoader, Transport } from "esptool-js";
|
|
2
|
-
import { MultiDeviceWhisperer } from "
|
|
2
|
+
import { MultiDeviceWhisperer } from "../base/device-whisperer.js";
|
|
3
3
|
export function SerialMultiDeviceWhisperer({ ...props } = {}) {
|
|
4
4
|
const base = MultiDeviceWhisperer(props);
|
|
5
5
|
const defaultOnReceive = (uuid, data) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeviceConnectionState, AddConnectionProps } from "
|
|
1
|
+
import { DeviceConnectionState, AddConnectionProps } from "../base/device-whisperer.js";
|
|
2
2
|
export type WebsocketConnectionState = DeviceConnectionState & {
|
|
3
3
|
ws?: WebSocket;
|
|
4
4
|
};
|
|
@@ -20,5 +20,5 @@ export declare function WebsocketMultiDeviceWhisperer<AppOrMessageLayer extends
|
|
|
20
20
|
connectionsRef: import("react").RefObject<AppOrMessageLayer[]>;
|
|
21
21
|
updateConnection: (uuid: string, updater: (c: AppOrMessageLayer) => AppOrMessageLayer) => void;
|
|
22
22
|
updateConnectionName: (uuid: string, name: string) => void;
|
|
23
|
-
appendLog: (uuid: string, log: import("
|
|
23
|
+
appendLog: (uuid: string, log: import("../base/device-whisperer.js").LogLine) => void;
|
|
24
24
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MultiDeviceWhisperer } from "
|
|
1
|
+
import { MultiDeviceWhisperer } from "../base/device-whisperer.js";
|
|
2
2
|
export function WebsocketMultiDeviceWhisperer(server_url, server_port, { ...props } = {}) {
|
|
3
3
|
const defaultOnReceive = (uuid, data) => {
|
|
4
4
|
const conn = base.connectionsRef.current.find((c) => c.uuid === uuid);
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ota-hub-reactjs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "ReactJS tools for building web apps to flash MCU devices such as esp32, brought to you by OTA Hub.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
5
|
"type": "module",
|
|
7
|
-
"
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|