Browse Source

update deps & mqtt config

pull/177/head
Sacha Weatherstone 2 years ago
parent
commit
6113924e46
Failed to extract signature
  1. 34
      package.json
  2. 1172
      pnpm-lock.yaml
  3. 39
      src/components/PageComponents/ModuleConfig/MQTT.tsx
  4. 24
      src/validation/moduleConfig/mqtt.ts

34
package.json

@ -20,9 +20,9 @@
},
"homepage": "https://meshtastic.org",
"dependencies": {
"@bufbuild/protobuf": "^1.7.2",
"@bufbuild/protobuf": "^1.8.0",
"@emeraldpay/hashicon-react": "^0.5.2",
"@meshtastic/js": "2.2.24-1",
"@meshtastic/js": "2.3.0-0",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
@ -43,41 +43,41 @@
"class-validator": "^0.14.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"cmdk": "^0.2.1",
"immer": "^10.0.3",
"lucide-react": "^0.331.0",
"cmdk": "^1.0.0",
"immer": "^10.0.4",
"lucide-react": "^0.358.0",
"mapbox-gl": "npm:empty-npm-package@^1.0.0",
"maplibre-gl": "4.0.1",
"maplibre-gl": "4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.50.1",
"react-hook-form": "^7.51.0",
"react-map-gl": "7.1.7",
"react-qrcode-logo": "^2.9.0",
"rfc4648": "^1.5.3",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
"timeago-react": "^3.0.6",
"zustand": "4.5.1"
"zustand": "4.5.2"
},
"devDependencies": {
"@biomejs/biome": "^1.5.3",
"@buf/meshtastic_protobufs.bufbuild_es": "1.7.2-20240216123215-6b07c41c68c9.1",
"@types/chrome": "^0.0.260",
"@types/node": "^20.11.19",
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
"@biomejs/biome": "^1.6.1",
"@buf/meshtastic_protobufs.bufbuild_es": "1.8.0-20240315175757-d06c1dd1ed8f.1",
"@types/chrome": "^0.0.263",
"@types/node": "^20.11.28",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@types/w3c-web-serial": "^1.0.6",
"@types/web-bluetooth": "^0.0.20",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"autoprefixer": "^10.4.18",
"gzipper": "^7.2.0",
"postcss": "^8.4.35",
"rollup-plugin-visualizer": "^5.12.0",
"tailwindcss": "^3.4.1",
"tar": "^6.2.0",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^5.1.3",
"typescript": "^5.4.2",
"vite": "^5.1.6",
"vite-plugin-environment": "^1.1.3"
}
}

1172
pnpm-lock.yaml

File diff suppressed because it is too large

39
src/components/PageComponents/ModuleConfig/MQTT.tsx

@ -122,6 +122,45 @@ export const MQTT = (): JSX.Element => {
},
],
},
{
type: "toggle",
name: "mapReportingEnabled",
label: "Map Reporting Enabled",
description: "Enable or disable map reporting",
disabledBy: [
{
fieldName: "enabled",
},
],
},
{
type: "number",
name: "mapReportSettings.publishIntervalSecs",
label: "Map Report Publish Interval (s)",
description: "Interval in seconds to publish map reports",
disabledBy: [
{
fieldName: "enabled",
},
{
fieldName: "mapReportingEnabled",
},
],
},
{
type: "number",
name: "mapReportSettings.positionPrecision",
label: "Position Precision",
description: "Precision of the position",
disabledBy: [
{
fieldName: "enabled",
},
{
fieldName: "mapReportingEnabled",
},
],
},
],
},
]}

24
src/validation/moduleConfig/mqtt.ts

@ -1,9 +1,13 @@
import type { Message } from "@bufbuild/protobuf";
import type { Protobuf } from "@meshtastic/js";
import { IsBoolean, IsString, Length } from "class-validator";
import { IsBoolean, IsString, Length, IsNumber } from "class-validator";
export class MqttValidation
implements Omit<Protobuf.ModuleConfig.ModuleConfig_MQTTConfig, keyof Message>
implements
Omit<
Protobuf.ModuleConfig.ModuleConfig_MQTTConfig,
keyof Message | "mapReportSettings"
>
{
@IsBoolean()
enabled: boolean;
@ -31,4 +35,20 @@ export class MqttValidation
@IsBoolean()
proxyToClientEnabled: boolean;
@IsBoolean()
mapReportingEnabled: boolean;
mapReportSettings: MqttValidationMapReportSettings;
}
export class MqttValidationMapReportSettings
implements
Omit<Protobuf.ModuleConfig.ModuleConfig_MapReportSettings, keyof Message>
{
@IsNumber()
publishIntervalSecs: number;
@IsNumber()
positionPrecision: number;
}

Loading…
Cancel
Save