{description}
diff --git a/src/components/PageComponents/Channel.tsx b/src/components/PageComponents/Channel.tsx
index dcd69c17..d7fb490b 100644
--- a/src/components/PageComponents/Channel.tsx
+++ b/src/components/PageComponents/Channel.tsx
@@ -1,8 +1,9 @@
import type { ChannelValidation } from "@app/validation/channel.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useToast } from "@core/hooks/useToast.ts";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { fromByteArray, toByteArray } from "base64-js";
import cryptoRandomString from "crypto-random-string";
import { useState } from "react";
@@ -27,7 +28,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
useState
(false);
const onSubmit = (data: ChannelValidation) => {
- const channel = new Protobuf.Channel.Channel({
+ const channel = create(Protobuf.Channel.ChannelSchema, {
...data,
settings: {
...data.settings,
diff --git a/src/components/PageComponents/Config/Bluetooth.tsx b/src/components/PageComponents/Config/Bluetooth.tsx
index 21bc7c4e..97a38fd0 100644
--- a/src/components/PageComponents/Config/Bluetooth.tsx
+++ b/src/components/PageComponents/Config/Bluetooth.tsx
@@ -1,8 +1,9 @@
import { useAppStore } from "@app/core/stores/appStore";
import type { BluetoothValidation } from "@app/validation/config/bluetooth.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { useState } from "react";
export const Bluetooth = () => {
@@ -53,7 +54,7 @@ export const Bluetooth = () => {
}
setWorkingConfig(
- new Protobuf.Config.Config({
+ create(Protobuf.Config.ConfigSchema, {
payloadVariant: {
case: "bluetooth",
value: data,
diff --git a/src/components/PageComponents/Config/Device.tsx b/src/components/PageComponents/Config/Device.tsx
index 17ee8cb2..30629bed 100644
--- a/src/components/PageComponents/Config/Device.tsx
+++ b/src/components/PageComponents/Config/Device.tsx
@@ -1,14 +1,15 @@
import type { DeviceValidation } from "@app/validation/config/device.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const Device = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice();
const onSubmit = (data: DeviceValidation) => {
setWorkingConfig(
- new Protobuf.Config.Config({
+ create(Protobuf.Config.ConfigSchema, {
payloadVariant: {
case: "device",
value: data,
diff --git a/src/components/PageComponents/Config/Display.tsx b/src/components/PageComponents/Config/Display.tsx
index 5589a8a7..e0d1e671 100644
--- a/src/components/PageComponents/Config/Display.tsx
+++ b/src/components/PageComponents/Config/Display.tsx
@@ -1,14 +1,15 @@
import type { DisplayValidation } from "@app/validation/config/display.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const Display = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice();
const onSubmit = (data: DisplayValidation) => {
setWorkingConfig(
- new Protobuf.Config.Config({
+ create(Protobuf.Config.ConfigSchema, {
payloadVariant: {
case: "display",
value: data,
diff --git a/src/components/PageComponents/Config/LoRa.tsx b/src/components/PageComponents/Config/LoRa.tsx
index 80665f6c..c1f3aa47 100644
--- a/src/components/PageComponents/Config/LoRa.tsx
+++ b/src/components/PageComponents/Config/LoRa.tsx
@@ -1,14 +1,15 @@
import type { LoRaValidation } from "@app/validation/config/lora.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const LoRa = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice();
const onSubmit = (data: LoRaValidation) => {
setWorkingConfig(
- new Protobuf.Config.Config({
+ create(Protobuf.Config.ConfigSchema, {
payloadVariant: {
case: "lora",
value: data,
diff --git a/src/components/PageComponents/Config/Network.tsx b/src/components/PageComponents/Config/Network.tsx
index afda4eb5..42d724d8 100644
--- a/src/components/PageComponents/Config/Network.tsx
+++ b/src/components/PageComponents/Config/Network.tsx
@@ -1,28 +1,32 @@
import type { NetworkValidation } from "@app/validation/config/network.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
import {
convertIntToIpAddress,
convertIpAddressToInt,
} from "@core/utils/ip.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const Network = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice();
const onSubmit = (data: NetworkValidation) => {
setWorkingConfig(
- new Protobuf.Config.Config({
+ create(Protobuf.Config.ConfigSchema, {
payloadVariant: {
case: "network",
value: {
...data,
- ipv4Config: new Protobuf.Config.Config_NetworkConfig_IpV4Config({
- ip: convertIpAddressToInt(data.ipv4Config.ip) ?? 0,
- gateway: convertIpAddressToInt(data.ipv4Config.gateway) ?? 0,
- subnet: convertIpAddressToInt(data.ipv4Config.subnet) ?? 0,
- dns: convertIpAddressToInt(data.ipv4Config.dns) ?? 0,
- }),
+ ipv4Config: create(
+ Protobuf.Config.Config_NetworkConfig_IpV4ConfigSchema,
+ {
+ ip: convertIpAddressToInt(data.ipv4Config.ip) ?? 0,
+ gateway: convertIpAddressToInt(data.ipv4Config.gateway) ?? 0,
+ subnet: convertIpAddressToInt(data.ipv4Config.subnet) ?? 0,
+ dns: convertIpAddressToInt(data.ipv4Config.dns) ?? 0,
+ },
+ ),
},
},
}),
diff --git a/src/components/PageComponents/Config/Position.tsx b/src/components/PageComponents/Config/Position.tsx
index e81af178..8d1992cc 100644
--- a/src/components/PageComponents/Config/Position.tsx
+++ b/src/components/PageComponents/Config/Position.tsx
@@ -3,9 +3,10 @@ import {
usePositionFlags,
} from "@app/core/hooks/usePositionFlags";
import type { PositionValidation } from "@app/validation/config/position.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { useCallback } from "react";
export const Position = () => {
@@ -16,7 +17,7 @@ export const Position = () => {
const onSubmit = (data: PositionValidation) => {
return setWorkingConfig(
- new Protobuf.Config.Config({
+ create(Protobuf.Config.ConfigSchema, {
payloadVariant: {
case: "position",
value: { ...data, positionFlags: flagsValue },
diff --git a/src/components/PageComponents/Config/Power.tsx b/src/components/PageComponents/Config/Power.tsx
index 4f52be5f..b1e389c6 100644
--- a/src/components/PageComponents/Config/Power.tsx
+++ b/src/components/PageComponents/Config/Power.tsx
@@ -1,14 +1,15 @@
import type { PowerValidation } from "@app/validation/config/power.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const Power = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice();
const onSubmit = (data: PowerValidation) => {
setWorkingConfig(
- new Protobuf.Config.Config({
+ create(Protobuf.Config.ConfigSchema, {
payloadVariant: {
case: "power",
value: data,
diff --git a/src/components/PageComponents/Config/Security/Security.tsx b/src/components/PageComponents/Config/Security/Security.tsx
index 9a1c72e9..c1468efc 100644
--- a/src/components/PageComponents/Config/Security/Security.tsx
+++ b/src/components/PageComponents/Config/Security/Security.tsx
@@ -6,8 +6,9 @@ import {
getX25519PublicKey,
} from "@app/core/utils/x25519";
import type { SecurityValidation } from "@app/validation/config/security.tsx";
+import { create } from "@bufbuild/protobuf";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { fromByteArray, toByteArray } from "base64-js";
import { Eye, EyeOff } from "lucide-react";
import { useReducer } from "react";
@@ -57,7 +58,9 @@ export const Security = () => {
if (input.length % 4 !== 0) {
addError(
fieldName,
- `${fieldName === "privateKey" ? "Private" : "Admin"} Key is required to be a 256 bit pre-shared key (PSK)`,
+ `${
+ fieldName === "privateKey" ? "Private" : "Admin"
+ } Key is required to be a 256 bit pre-shared key (PSK)`,
);
return;
}
@@ -71,7 +74,9 @@ export const Security = () => {
console.error(e);
addError(
fieldName,
- `Invalid ${fieldName === "privateKey" ? "Private" : "Admin"} Key format`,
+ `Invalid ${
+ fieldName === "privateKey" ? "Private" : "Admin"
+ } Key format`,
);
}
};
@@ -83,7 +88,7 @@ export const Security = () => {
console.log(toByteArray(state.adminKey));
setWorkingConfig(
- new Protobuf.Config.Config({
+ create(Protobuf.Config.ConfigSchema, {
payloadVariant: {
case: "security",
value: {
@@ -164,6 +169,7 @@ export const Security = () => {
fields: [
{
type: "passwordGenerator",
+ id: "pskInput",
name: "privateKey",
label: "Private Key",
description: "Used to create a shared key with a remote device",
@@ -234,6 +240,7 @@ export const Security = () => {
{
type: "passwordGenerator",
name: "adminKey",
+ id: "adminKeyInput",
label: "Admin Key",
description:
"The public key authorized to send admin messages to this node",
@@ -241,7 +248,7 @@ export const Security = () => {
? getErrorMessage("adminKey")
: "",
inputChange: adminKeyInputChangeEvent,
- selectChange: () => { },
+ selectChange: () => {},
bits: [{ text: "256 bit", value: "32", key: "bit256" }],
devicePSKBitCount: state.privateKeyBitCount,
hide: !state.adminKeyVisible,
diff --git a/src/components/PageComponents/Connect/HTTP.tsx b/src/components/PageComponents/Connect/HTTP.tsx
index 1f8991fc..226d4c47 100644
--- a/src/components/PageComponents/Connect/HTTP.tsx
+++ b/src/components/PageComponents/Connect/HTTP.tsx
@@ -7,7 +7,8 @@ import { useAppStore } from "@core/stores/appStore.ts";
import { useDeviceStore } from "@core/stores/deviceStore.ts";
import { subscribeAll } from "@core/subscriptions.ts";
import { randId } from "@core/utils/randId.ts";
-import { HttpConnection } from "@meshtastic/js";
+import { MeshDevice } from "@meshtastic/core";
+import { TransportHTTP } from "@meshtastic/transport-http";
import { type JSX, useState } from "react";
import { Controller, useForm } from "react-hook-form";
@@ -36,13 +37,9 @@ export const HTTP = ({ closeDialog }: TabElementProps): JSX.Element => {
const id = randId();
const device = addDevice(id);
- const connection = new HttpConnection(id);
- // TODO: Promise never resolves
- await connection.connect({
- address: data.ip,
- fetchInterval: 2000,
- tls: data.tls,
- });
+ const transport = await TransportHTTP.create(data.ip, data.tls);
+ const connection = new MeshDevice(transport, id);
+ connection.configure();
setSelectedDevice(id);
device.addConnection(connection);
diff --git a/src/components/PageComponents/Connect/Serial.tsx b/src/components/PageComponents/Connect/Serial.tsx
index 529b8c3d..f5288403 100644
--- a/src/components/PageComponents/Connect/Serial.tsx
+++ b/src/components/PageComponents/Connect/Serial.tsx
@@ -5,7 +5,8 @@ import { useAppStore } from "@core/stores/appStore.ts";
import { useDeviceStore } from "@core/stores/deviceStore.ts";
import { subscribeAll } from "@core/subscriptions.ts";
import { randId } from "@core/utils/randId.ts";
-import { SerialConnection } from "@meshtastic/js";
+import { MeshDevice } from "@meshtastic/core";
+import { TransportWebSerial } from "@meshtastic/transport-web-serial";
import { useCallback, useEffect, useState } from "react";
export const Serial = ({ closeDialog }: TabElementProps): JSX.Element => {
@@ -31,14 +32,9 @@ export const Serial = ({ closeDialog }: TabElementProps): JSX.Element => {
const id = randId();
const device = addDevice(id);
setSelectedDevice(id);
- const connection = new SerialConnection(id);
- await connection
- .connect({
- port,
- baudRate: undefined,
- concurrentLogOutput: true,
- })
- .catch((e: Error) => console.log(`Unable to Connect: ${e.message}`));
+ const transport = await TransportWebSerial.createFromPort(port);
+ const connection = new MeshDevice(transport, id);
+ connection.configure();
device.addConnection(connection);
subscribeAll(device, connection);
diff --git a/src/components/PageComponents/Map/NodeDetail.tsx b/src/components/PageComponents/Map/NodeDetail.tsx
index 868bd6ab..2eac8d14 100644
--- a/src/components/PageComponents/Map/NodeDetail.tsx
+++ b/src/components/PageComponents/Map/NodeDetail.tsx
@@ -5,8 +5,8 @@ import { formatQuantity } from "@app/core/utils/string";
import { Avatar } from "@components/UI/Avatar";
import { Mono } from "@components/generic/Mono.tsx";
import { TimeAgo } from "@components/generic/TimeAgo.tsx";
-import { Protobuf } from "@meshtastic/js";
-import type { Protobuf as ProtobufType } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
+import type { Protobuf as ProtobufType } from "@meshtastic/core";
import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
import {
BatteryChargingIcon,
diff --git a/src/components/PageComponents/Messages/ChannelChat.tsx b/src/components/PageComponents/Messages/ChannelChat.tsx
index a5231496..bc54865c 100644
--- a/src/components/PageComponents/Messages/ChannelChat.tsx
+++ b/src/components/PageComponents/Messages/ChannelChat.tsx
@@ -4,7 +4,7 @@ import {
} from "@app/core/stores/deviceStore.ts";
import { Message } from "@components/PageComponents/Messages/Message.tsx";
import { MessageInput } from "@components/PageComponents/Messages/MessageInput.tsx";
-import type { Types } from "@meshtastic/js";
+import type { Types } from "@meshtastic/core";
import { InboxIcon } from "lucide-react";
import { useCallback, useEffect, useRef } from "react";
import type { JSX } from "react";
diff --git a/src/components/PageComponents/Messages/Message.tsx b/src/components/PageComponents/Messages/Message.tsx
index af178b0d..ce2d4705 100644
--- a/src/components/PageComponents/Messages/Message.tsx
+++ b/src/components/PageComponents/Messages/Message.tsx
@@ -11,7 +11,7 @@ import {
} from "@app/core/stores/deviceStore.ts";
import { cn } from "@app/core/utils/cn";
import { Avatar } from "@components/UI/Avatar";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { AlertCircle, CheckCircle2, CircleEllipsis } from "lucide-react";
import type { LucideIcon } from "lucide-react";
import { useMemo } from "react";
diff --git a/src/components/PageComponents/Messages/MessageInput.tsx b/src/components/PageComponents/Messages/MessageInput.tsx
index 1e4887cd..8c2e369f 100644
--- a/src/components/PageComponents/Messages/MessageInput.tsx
+++ b/src/components/PageComponents/Messages/MessageInput.tsx
@@ -2,7 +2,7 @@ import { debounce } from "@app/core/utils/debounce";
import { Button } from "@components/UI/Button.tsx";
import { Input } from "@components/UI/Input.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import type { Types } from "@meshtastic/js";
+import type { Types } from "@meshtastic/core";
import { SendIcon } from "lucide-react";
import {
type JSX,
diff --git a/src/components/PageComponents/Messages/TraceRoute.tsx b/src/components/PageComponents/Messages/TraceRoute.tsx
index 2c9e813a..e0883323 100644
--- a/src/components/PageComponents/Messages/TraceRoute.tsx
+++ b/src/components/PageComponents/Messages/TraceRoute.tsx
@@ -1,5 +1,5 @@
import { useDevice } from "@app/core/stores/deviceStore.ts";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
import type { JSX } from "react";
diff --git a/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx b/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx
index 978ef633..effe7471 100644
--- a/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx
+++ b/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx
@@ -1,14 +1,15 @@
import { useDevice } from "@app/core/stores/deviceStore.ts";
import type { AmbientLightingValidation } from "@app/validation/moduleConfig/ambientLighting.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const AmbientLighting = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: AmbientLightingValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "ambientLighting",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/Audio.tsx b/src/components/PageComponents/ModuleConfig/Audio.tsx
index c68bd9bf..08960704 100644
--- a/src/components/PageComponents/ModuleConfig/Audio.tsx
+++ b/src/components/PageComponents/ModuleConfig/Audio.tsx
@@ -1,14 +1,15 @@
import type { AudioValidation } from "@app/validation/moduleConfig/audio.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const Audio = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: AudioValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "audio",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/CannedMessage.tsx b/src/components/PageComponents/ModuleConfig/CannedMessage.tsx
index 5fb1046a..b800035d 100644
--- a/src/components/PageComponents/ModuleConfig/CannedMessage.tsx
+++ b/src/components/PageComponents/ModuleConfig/CannedMessage.tsx
@@ -1,14 +1,15 @@
import type { CannedMessageValidation } from "@app/validation/moduleConfig/cannedMessage.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const CannedMessage = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: CannedMessageValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "cannedMessage",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx b/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx
index c7ec3c98..056c48dd 100644
--- a/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx
+++ b/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx
@@ -1,14 +1,15 @@
import { useDevice } from "@app/core/stores/deviceStore.ts";
import type { DetectionSensorValidation } from "@app/validation/moduleConfig/detectionSensor.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const DetectionSensor = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: DetectionSensorValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "detectionSensor",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx b/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx
index f6b52662..6d767ea1 100644
--- a/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx
+++ b/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx
@@ -1,14 +1,15 @@
import type { ExternalNotificationValidation } from "@app/validation/moduleConfig/externalNotification.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const ExternalNotification = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: ExternalNotificationValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "externalNotification",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/MQTT.tsx b/src/components/PageComponents/ModuleConfig/MQTT.tsx
index bb9b1527..28e3cba9 100644
--- a/src/components/PageComponents/ModuleConfig/MQTT.tsx
+++ b/src/components/PageComponents/ModuleConfig/MQTT.tsx
@@ -1,22 +1,23 @@
import { useDevice } from "@app/core/stores/deviceStore.ts";
import type { MqttValidation } from "@app/validation/moduleConfig/mqtt.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const MQTT = (): JSX.Element => {
const { config, moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: MqttValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "mqtt",
value: {
...data,
- mapReportSettings:
- new Protobuf.ModuleConfig.ModuleConfig_MapReportSettings(
- data.mapReportSettings,
- ),
+ mapReportSettings: create(
+ Protobuf.ModuleConfig.ModuleConfig_MapReportSettingsSchema,
+ data.mapReportSettings,
+ ),
},
},
}),
diff --git a/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx b/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx
index 9c878911..b3391f0f 100644
--- a/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx
+++ b/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx
@@ -1,14 +1,15 @@
import { useDevice } from "@app/core/stores/deviceStore.ts";
import type { NeighborInfoValidation } from "@app/validation/moduleConfig/neighborInfo.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const NeighborInfo = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: NeighborInfoValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "neighborInfo",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/Paxcounter.tsx b/src/components/PageComponents/ModuleConfig/Paxcounter.tsx
index e31a298c..fd5b372f 100644
--- a/src/components/PageComponents/ModuleConfig/Paxcounter.tsx
+++ b/src/components/PageComponents/ModuleConfig/Paxcounter.tsx
@@ -1,14 +1,15 @@
import type { PaxcounterValidation } from "@app/validation/moduleConfig/paxcounter.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const Paxcounter = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: PaxcounterValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "paxcounter",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/RangeTest.tsx b/src/components/PageComponents/ModuleConfig/RangeTest.tsx
index a661805d..e0fbdf2f 100644
--- a/src/components/PageComponents/ModuleConfig/RangeTest.tsx
+++ b/src/components/PageComponents/ModuleConfig/RangeTest.tsx
@@ -1,14 +1,15 @@
import type { RangeTestValidation } from "@app/validation/moduleConfig/rangeTest.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const RangeTest = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: RangeTestValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "rangeTest",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/Serial.tsx b/src/components/PageComponents/ModuleConfig/Serial.tsx
index 92db0d9a..05713f20 100644
--- a/src/components/PageComponents/ModuleConfig/Serial.tsx
+++ b/src/components/PageComponents/ModuleConfig/Serial.tsx
@@ -1,14 +1,15 @@
import type { SerialValidation } from "@app/validation/moduleConfig/serial.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const Serial = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: SerialValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "serial",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/StoreForward.tsx b/src/components/PageComponents/ModuleConfig/StoreForward.tsx
index 6fe5c585..72ca9bee 100644
--- a/src/components/PageComponents/ModuleConfig/StoreForward.tsx
+++ b/src/components/PageComponents/ModuleConfig/StoreForward.tsx
@@ -1,14 +1,15 @@
import type { StoreForwardValidation } from "@app/validation/moduleConfig/storeForward.ts";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const StoreForward = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: StoreForwardValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "storeForward",
value: data,
diff --git a/src/components/PageComponents/ModuleConfig/Telemetry.tsx b/src/components/PageComponents/ModuleConfig/Telemetry.tsx
index 24074f48..c2de366e 100644
--- a/src/components/PageComponents/ModuleConfig/Telemetry.tsx
+++ b/src/components/PageComponents/ModuleConfig/Telemetry.tsx
@@ -1,14 +1,15 @@
import type { TelemetryValidation } from "@app/validation/moduleConfig/telemetry.tsx";
+import { create } from "@bufbuild/protobuf";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
export const Telemetry = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice();
const onSubmit = (data: TelemetryValidation) => {
setWorkingModuleConfig(
- new Protobuf.ModuleConfig.ModuleConfig({
+ create(Protobuf.ModuleConfig.ModuleConfigSchema, {
payloadVariant: {
case: "telemetry",
value: data,
diff --git a/src/components/UI/Generator.tsx b/src/components/UI/Generator.tsx
index 6caf4ccc..80427c85 100644
--- a/src/components/UI/Generator.tsx
+++ b/src/components/UI/Generator.tsx
@@ -15,6 +15,7 @@ export interface GeneratorProps extends React.BaseHTMLAttributes {
type: "text" | "password";
devicePSKBitCount?: number;
value: string;
+ id: string;
variant: "default" | "invalid";
actionButtons: {
text: string;
@@ -37,6 +38,7 @@ const Generator = React.forwardRef(
{
type,
devicePSKBitCount,
+ id = "pskInput",
variant,
value,
actionButtons,
@@ -73,7 +75,7 @@ const Generator = React.forwardRef(
<>
Device | undefined;
}
-export const useDeviceStore = create((set, get) => ({
+export const useDeviceStore = createStore((set, get) => ({
devices: new Map(),
remoteDevices: new Map(),
@@ -122,11 +121,11 @@ export const useDeviceStore = create((set, get) => ({
id,
status: Types.DeviceStatusEnum.DeviceDisconnected,
channels: new Map(),
- config: new Protobuf.LocalOnly.LocalConfig(),
- moduleConfig: new Protobuf.LocalOnly.LocalModuleConfig(),
+ config: create(Protobuf.LocalOnly.LocalConfigSchema),
+ moduleConfig: create(Protobuf.LocalOnly.LocalModuleConfigSchema),
workingConfig: [],
workingModuleConfig: [],
- hardware: new Protobuf.Mesh.MyNodeInfo(),
+ hardware: create(Protobuf.Mesh.MyNodeInfoSchema),
nodes: new Map(),
metadata: new Map(),
messages: {
@@ -138,7 +137,6 @@ export const useDeviceStore = create((set, get) => ({
activePage: "messages",
activeNode: 0,
waypoints: [],
- // currentMetrics: new Protobuf.DeviceMetrics(),
dialog: {
import: false,
QR: false,
@@ -448,7 +446,8 @@ export const useDeviceStore = create((set, get) => ({
return;
}
const currentNode =
- device.nodes.get(user.from) ?? new Protobuf.Mesh.NodeInfo();
+ device.nodes.get(user.from) ??
+ create(Protobuf.Mesh.NodeInfoSchema);
currentNode.user = user.data;
device.nodes.set(user.from, currentNode);
}),
@@ -463,7 +462,7 @@ export const useDeviceStore = create((set, get) => ({
}
const currentNode =
device.nodes.get(position.from) ??
- new Protobuf.Mesh.NodeInfo();
+ create(Protobuf.Mesh.NodeInfoSchema);
currentNode.position = position.data;
device.nodes.set(position.from, currentNode);
}),
@@ -618,7 +617,7 @@ export const useDeviceStore = create((set, get) => ({
} else {
device.nodes.set(
data.from,
- new Protobuf.Mesh.NodeInfo({
+ create(Protobuf.Mesh.NodeInfoSchema, {
num: data.from,
lastHeard: data.time,
snr: data.snr,
diff --git a/src/core/subscriptions.ts b/src/core/subscriptions.ts
index afba12b7..8dac29db 100644
--- a/src/core/subscriptions.ts
+++ b/src/core/subscriptions.ts
@@ -1,5 +1,5 @@
import type { Device } from "@core/stores/deviceStore.ts";
-import { Protobuf, type Types } from "@meshtastic/js";
+import { Protobuf, type Types } from "@meshtastic/core";
export const subscribeAll = (
device: Device,
diff --git a/src/pages/Channels.tsx b/src/pages/Channels.tsx
index 3a47455c..4c2cd83c 100644
--- a/src/pages/Channels.tsx
+++ b/src/pages/Channels.tsx
@@ -8,8 +8,8 @@ import { Channel } from "@components/PageComponents/Channel.tsx";
import { PageLayout } from "@components/PageLayout.tsx";
import { Sidebar } from "@components/Sidebar.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Types } from "@meshtastic/js";
-import type { Protobuf } from "@meshtastic/js";
+import { Types } from "@meshtastic/core";
+import type { Protobuf } from "@meshtastic/core";
import { ImportIcon, QrCodeIcon } from "lucide-react";
import { useState } from "react";
diff --git a/src/pages/Map/index.tsx b/src/pages/Map/index.tsx
index 481b88c7..c1c484a5 100644
--- a/src/pages/Map/index.tsx
+++ b/src/pages/Map/index.tsx
@@ -4,7 +4,7 @@ import { useTheme } from "@app/core/hooks/useTheme";
import { PageLayout } from "@components/PageLayout.tsx";
import { Sidebar } from "@components/Sidebar.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { bbox, lineString } from "@turf/turf";
import { current } from "immer";
import { MapPinIcon } from "lucide-react";
@@ -17,7 +17,7 @@ import {
Popup,
ScaleControl,
useMap,
-} from "react-map-gl";
+} from "react-map-gl/maplibre";
import MapGl from "react-map-gl/maplibre";
type NodePosition = {
diff --git a/src/pages/Messages.tsx b/src/pages/Messages.tsx
index 670bab74..c4060804 100644
--- a/src/pages/Messages.tsx
+++ b/src/pages/Messages.tsx
@@ -7,7 +7,7 @@ import { SidebarSection } from "@components/UI/Sidebar/SidebarSection.tsx";
import { SidebarButton } from "@components/UI/Sidebar/sidebarButton.tsx";
import { useToast } from "@core/hooks/useToast.ts";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf, Types } from "@meshtastic/js";
+import { Protobuf, Types } from "@meshtastic/core";
import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
import { getChannelName } from "@pages/Channels.tsx";
import { HashIcon, LockIcon, LockOpenIcon, WaypointsIcon } from "lucide-react";
diff --git a/src/pages/Nodes.tsx b/src/pages/Nodes.tsx
index 0fadf0ca..429fcbdd 100644
--- a/src/pages/Nodes.tsx
+++ b/src/pages/Nodes.tsx
@@ -8,7 +8,7 @@ import { Mono } from "@components/generic/Mono.tsx";
import { Table } from "@components/generic/Table/index.tsx";
import { TimeAgo } from "@components/generic/TimeAgo.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
-import { Protobuf, type Types } from "@meshtastic/js";
+import { Protobuf, type Types } from "@meshtastic/core";
import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
import { LockIcon, LockOpenIcon } from "lucide-react";
import { Fragment, type JSX, useCallback, useEffect, useState } from "react";
diff --git a/src/validation/channel.ts b/src/validation/channel.ts
index 33349d06..6316ce4e 100644
--- a/src/validation/channel.ts
+++ b/src/validation/channel.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import {
IsBoolean,
IsEnum,
diff --git a/src/validation/config/bluetooth.ts b/src/validation/config/bluetooth.ts
index efaca6e9..e84d8f27 100644
--- a/src/validation/config/bluetooth.ts
+++ b/src/validation/config/bluetooth.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsEnum, IsInt } from "class-validator";
export class BluetoothValidation
diff --git a/src/validation/config/device.ts b/src/validation/config/device.ts
index b61be39f..5c79d583 100644
--- a/src/validation/config/device.ts
+++ b/src/validation/config/device.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsEnum, IsInt, IsString } from "class-validator";
export class DeviceValidation
diff --git a/src/validation/config/display.ts b/src/validation/config/display.ts
index 48831052..ed21d3f9 100644
--- a/src/validation/config/display.ts
+++ b/src/validation/config/display.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsEnum, IsInt } from "class-validator";
export class DisplayValidation
diff --git a/src/validation/config/lora.ts b/src/validation/config/lora.ts
index e8ff5cef..4fb5646a 100644
--- a/src/validation/config/lora.ts
+++ b/src/validation/config/lora.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { IsArray, IsBoolean, IsEnum, IsInt, Max, Min } from "class-validator";
export class LoRaValidation
diff --git a/src/validation/config/network.ts b/src/validation/config/network.ts
index 41db88d7..922f9563 100644
--- a/src/validation/config/network.ts
+++ b/src/validation/config/network.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import {
IsBoolean,
IsEnum,
diff --git a/src/validation/config/position.ts b/src/validation/config/position.ts
index 7eb42c56..97822bb4 100644
--- a/src/validation/config/position.ts
+++ b/src/validation/config/position.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { IsArray, IsBoolean, IsEnum, IsInt } from "class-validator";
const DeprecatedPositionValidationFields = ["gpsEnabled", "gpsAttemptTime"];
diff --git a/src/validation/config/power.ts b/src/validation/config/power.ts
index 67bd1cd0..0e1012d3 100644
--- a/src/validation/config/power.ts
+++ b/src/validation/config/power.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsInt, IsNumber, Max, Min } from "class-validator";
export class PowerValidation
diff --git a/src/validation/config/security.ts b/src/validation/config/security.ts
index d1a35808..0b9aa7d4 100644
--- a/src/validation/config/security.ts
+++ b/src/validation/config/security.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsString } from "class-validator";
export class SecurityValidation
diff --git a/src/validation/moduleConfig/ambientLighting.ts b/src/validation/moduleConfig/ambientLighting.ts
index 2e72f00e..30801067 100644
--- a/src/validation/moduleConfig/ambientLighting.ts
+++ b/src/validation/moduleConfig/ambientLighting.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsInt } from "class-validator";
export class AmbientLightingValidation
diff --git a/src/validation/moduleConfig/audio.ts b/src/validation/moduleConfig/audio.ts
index da527a66..091350f7 100644
--- a/src/validation/moduleConfig/audio.ts
+++ b/src/validation/moduleConfig/audio.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsEnum, IsInt } from "class-validator";
export class AudioValidation
diff --git a/src/validation/moduleConfig/cannedMessage.ts b/src/validation/moduleConfig/cannedMessage.ts
index 85c8d6a7..6701c553 100644
--- a/src/validation/moduleConfig/cannedMessage.ts
+++ b/src/validation/moduleConfig/cannedMessage.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsEnum, IsInt, Length } from "class-validator";
export class CannedMessageValidation
diff --git a/src/validation/moduleConfig/detectionSensor.ts b/src/validation/moduleConfig/detectionSensor.ts
index 3e026fee..b6acaa98 100644
--- a/src/validation/moduleConfig/detectionSensor.ts
+++ b/src/validation/moduleConfig/detectionSensor.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsInt, Length } from "class-validator";
export class DetectionSensorValidation
diff --git a/src/validation/moduleConfig/externalNotification.ts b/src/validation/moduleConfig/externalNotification.ts
index cf08a321..e7b9e044 100644
--- a/src/validation/moduleConfig/externalNotification.ts
+++ b/src/validation/moduleConfig/externalNotification.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsInt } from "class-validator";
export class ExternalNotificationValidation
diff --git a/src/validation/moduleConfig/mqtt.ts b/src/validation/moduleConfig/mqtt.ts
index 7a2c9170..79608610 100644
--- a/src/validation/moduleConfig/mqtt.ts
+++ b/src/validation/moduleConfig/mqtt.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import {
IsBoolean,
IsNumber,
diff --git a/src/validation/moduleConfig/neighborInfo.ts b/src/validation/moduleConfig/neighborInfo.ts
index f6b48a01..b81a04d6 100644
--- a/src/validation/moduleConfig/neighborInfo.ts
+++ b/src/validation/moduleConfig/neighborInfo.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsInt } from "class-validator";
export class NeighborInfoValidation
diff --git a/src/validation/moduleConfig/paxcounter.ts b/src/validation/moduleConfig/paxcounter.ts
index 6f5bc66a..10d0ece0 100644
--- a/src/validation/moduleConfig/paxcounter.ts
+++ b/src/validation/moduleConfig/paxcounter.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsInt } from "class-validator";
export class PaxcounterValidation
diff --git a/src/validation/moduleConfig/rangeTest.ts b/src/validation/moduleConfig/rangeTest.ts
index 9cc9a96e..fa7a1feb 100644
--- a/src/validation/moduleConfig/rangeTest.ts
+++ b/src/validation/moduleConfig/rangeTest.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsInt } from "class-validator";
export class RangeTestValidation
diff --git a/src/validation/moduleConfig/serial.ts b/src/validation/moduleConfig/serial.ts
index 75861abd..db69c7c5 100644
--- a/src/validation/moduleConfig/serial.ts
+++ b/src/validation/moduleConfig/serial.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import { Protobuf } from "@meshtastic/js";
+import { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsEnum, IsInt } from "class-validator";
export class SerialValidation
diff --git a/src/validation/moduleConfig/storeForward.ts b/src/validation/moduleConfig/storeForward.ts
index 773a2539..39007de8 100644
--- a/src/validation/moduleConfig/storeForward.ts
+++ b/src/validation/moduleConfig/storeForward.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsInt } from "class-validator";
export class StoreForwardValidation
diff --git a/src/validation/moduleConfig/telemetry.ts b/src/validation/moduleConfig/telemetry.ts
index 48b89025..08cc3d70 100644
--- a/src/validation/moduleConfig/telemetry.ts
+++ b/src/validation/moduleConfig/telemetry.ts
@@ -1,5 +1,5 @@
import type { Message } from "@bufbuild/protobuf";
-import type { Protobuf } from "@meshtastic/js";
+import type { Protobuf } from "@meshtastic/core";
import { IsBoolean, IsInt } from "class-validator";
export class TelemetryValidation
diff --git a/tsconfig.json b/tsconfig.json
index 9f4e8d3f..91f1dff3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -10,8 +10,8 @@
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
- "module": "ESNext",
- "moduleResolution": "Node",
+ "module": "NodeNext",
+ "moduleResolution": "nodenext",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,