File tree Expand file tree Collapse file tree 11 files changed +66
-66
lines changed
Expand file tree Collapse file tree 11 files changed +66
-66
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ jobs:
1212 uses : actions/checkout@v4
1313
1414 - name : Setup Biome
15- uses : biomejs/setup-biome@v1
15+ uses : biomejs/setup-biome@v2
1616 with :
1717 version : latest
1818
1919 - name : Run Biome
20- run : biome ci .
20+ run : biome ci
2121 build :
2222 runs-on : ubuntu-latest
2323 steps :
Original file line number Diff line number Diff line change 11{
2- "$schema" : " https://biomejs.dev/schemas/1.5.0/schema.json" ,
3- "organizeImports" : {
4- "enabled" : true
5- },
2+ "$schema" : " https://biomejs.dev/schemas/2.0.6/schema.json" ,
3+ "assist" : { "actions" : { "source" : { "organizeImports" : " on" } } },
64 "files" : {
75 "ignoreUnknown" : true
86 },
2018 "linter" : {
2119 "enabled" : true ,
2220 "rules" : {
23- "all" : true ,
2421 "style" : {
25- "useNamingConvention" : " off"
22+ "useNamingConvention" : " off" ,
23+ "noParameterAssign" : " error" ,
24+ "useAsConstAssertion" : " error" ,
25+ "useDefaultParameterLast" : " error" ,
26+ "useEnumInitializers" : " error" ,
27+ "useSelfClosingElements" : " error" ,
28+ "useSingleVarDeclarator" : " error" ,
29+ "noUnusedTemplateLiteral" : " error" ,
30+ "useNumberNamespace" : " error" ,
31+ "noInferrableTypes" : " error" ,
32+ "noUselessElse" : " error"
2633 }
2734 }
2835 }
29- }
36+ }
Original file line number Diff line number Diff line change 3434 "typescript" : " ^5.3.3"
3535 },
3636 "devDependencies" : {
37- "@biomejs/biome" : " 1.9.4 " ,
37+ "@biomejs/biome" : " 2.0.6 " ,
3838 "@buf/meshtastic_protobufs.bufbuild_es" : " 1.7.2-20240216123215-6b07c41c68c9.1" ,
3939 "@types/node" : " ^20.11.19" ,
4040 "prisma" : " ^5.9.1" ,
Original file line number Diff line number Diff line change 1+ import { GatewayService } from "@buf/meshtastic_api.connectrpc_es/protobufs/gateway/v1/gateway_service_connect.js" ;
2+ import { expressConnectMiddleware } from "@connectrpc/connect-express" ;
13import { App } from "@tinyhttp/app" ;
24import { cors } from "@tinyhttp/cors" ;
35import { config } from "@tinyhttp/dotenv" ;
4- import { logger } from "@tinyhttp/logger" ;
56import { favicon } from "@tinyhttp/favicon" ;
6-
7+ import { logger } from "@tinyhttp/logger" ;
8+ import { RegisterMqttClient } from "./lib/index.js" ;
79import {
810 FirmwareRoutes ,
911 GithubRoutes ,
12+ MqttRoutes ,
1013 ResourceRoutes ,
1114 UpdaterRoutes ,
12- MqttRoutes ,
1315} from "./routes/index.js" ;
14- import { RegisterMqttClient } from "./lib/index.js" ;
15- import { expressConnectMiddleware } from "@connectrpc/connect-express" ;
16- import { GatewayService } from "@buf/meshtastic_api.connectrpc_es/protobufs/gateway/v1/gateway_service_connect.js" ;
1716import { Gateway } from "./services/index.js" ;
1817
1918export const app = new App ( ) ;
Original file line number Diff line number Diff line change 1- import { Octokit } from "octokit" ;
2-
31import { createAppAuth } from "@octokit/auth-app" ;
42import { config } from "@tinyhttp/dotenv" ;
3+ import { Octokit } from "octokit" ;
54
65const DEVICE_OWNER = "meshtastic" ;
76const DEVICE_REPO = "firmware" ;
Original file line number Diff line number Diff line change 11export * as GitHub from "./github.js" ;
2- export * as Hardware from "./resource.js" ;
3- export { redis } from "./redis.js" ;
42export { RegisterMqttClient } from "./mqtt.js" ;
53export { prisma } from "./prisma.js" ;
4+ export { redis } from "./redis.js" ;
5+ export * as Hardware from "./resource.js" ;
Original file line number Diff line number Diff line change 1- import MQTT from "mqtt" ;
21import { Protobuf } from "@meshtastic/js" ;
2+ import MQTT from "mqtt" ;
33import { prisma , redis } from "./index.js" ;
44
55const mqtt = MQTT . connect ( process . env . MQTT_URL as string , {
@@ -22,13 +22,10 @@ export const RegisterMqttClient = () => {
2222 const decoded = Protobuf . Mqtt . ServiceEnvelope . fromBinary ( payload ) ;
2323 queue . push ( decoded ) ;
2424 } catch ( error ) {
25- // biome-ignore lint/suspicious/noConsole: fix soon
2625 console . error ( error , topic , payload ) ;
2726 }
2827 } else {
2928 // Likely stat message
30- // biome-ignore lint/suspicious/noConsoleLog: fix soon
31- // biome-ignore lint/suspicious/noConsole: fix soon
3229 console . log ( "Unknown topic" , topic ) ;
3330 }
3431 } ) ;
@@ -138,8 +135,6 @@ class MqttQueue {
138135
139136 for ( const gateway of toProcess ) {
140137 for ( const channel of gateway . channels ) {
141- // biome-ignore lint/suspicious/noConsoleLog: fix soon
142- // biome-ignore lint/suspicious/noConsole: fix soon
143138 console . log (
144139 "Queue:" ,
145140 this . queue . length ,
Original file line number Diff line number Diff line change 11import Prisma from "@prisma/client" ;
2+
23const { PrismaClient } = Prisma ;
34
45export const prisma = new PrismaClient ( ) ;
Original file line number Diff line number Diff line change 11export { FirmwareRoutes } from "./firmware.js" ;
22export { GithubRoutes } from "./github.js" ;
3+ export { MqttRoutes } from "./mqtt.js" ;
34export { ResourceRoutes } from "./resource.js" ;
45export { UpdaterRoutes } from "./updater.js" ;
5- export { MqttRoutes } from "./mqtt.js" ;
You can’t perform that action at this time.
0 commit comments