diff --git a/biome.json b/biome.json index 403142b..4f8296d 100644 --- a/biome.json +++ b/biome.json @@ -1,13 +1,32 @@ { "files": { - "ignore": [ - "ui/node_modules/**/*", - "ui/vendor/**/*", - "ui/dist/**/*", - "config.json", - "gsm_operator_cache.json" + "includes": [ + "./package.json", + "**/server/**/*", + "**/ui/**/*", + "**/*.json", + "!**/ui/node_modules/**/*", + "!**/ui/vendor/**/*", + "!**/ui/dist/**/*", + "!**/config.json", + "!**/gsm_operator_cache.json" ], - "include": ["server/**/*", "ui/**/*", "*.json"], "ignoreUnknown": true + }, + "linter": { + "rules": { + "style": { + "noParameterAssign": "error", + "useAsConstAssertion": "error", + "useDefaultParameterLast": "error", + "useEnumInitializers": "error", + "useSelfClosingElements": "error", + "useSingleVarDeclarator": "error", + "noUnusedTemplateLiteral": "error", + "useNumberNamespace": "error", + "noInferrableTypes": "error", + "noUselessElse": "error" + } + } } } diff --git a/bun.lockb b/bun.lockb index c12f584..d8605a9 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index ed7fdde..7f4fda8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,10 @@ { "name": "@belaui/root", "type": "module", - "workspaces": ["server", "ui"], + "workspaces": [ + "server", + "ui" + ], "dependencies": {}, "devDependencies": { "@types/bun": "^1.2.4", @@ -11,7 +14,7 @@ }, "scripts": { "check": "bun run --bun --filter '*' check && run-p check:*", - "check:biome": "bun x --bun @biomejs/biome check", + "check:biome": "bun x --bun @biomejs/biome check .", "dev": "bun run --bun --filter '*' dev", "fix": "bun run --bun --filter '*' fix", "lint": "bun run --bun --filter '*' lint", @@ -20,5 +23,8 @@ "build:copy-ui": "mkdir -p ./dist/public && rm -rf ./dist/public/* && cp -r ./ui/dist/* ./dist/public/", "build:copy-server": "mkdir -p ./dist && cp ./server/belaUI ./dist/" }, - "trustedDependencies": ["@biomejs/biome", "esbuild"] + "trustedDependencies": [ + "@biomejs/biome", + "esbuild" + ] } diff --git a/server/helpers/exec.ts b/server/helpers/exec.ts index bfdd5ff..0e9a684 100644 --- a/server/helpers/exec.ts +++ b/server/helpers/exec.ts @@ -12,7 +12,7 @@ export async function execPNR(cmd: string) { try { const res = await execP(cmd); return { stdout: res.stdout, stderr: res.stderr, code: 0 }; - } catch (err) { + } catch (_err) { return { stdout: "", stderr: "", code: 1 }; } } @@ -21,7 +21,7 @@ export function checkExecPathSafe(path: string) { try { fs.accessSync(path, fs.constants.R_OK); return true; - } catch (err) { + } catch (_err) { logger.error( `\n\n${path} not found, double check the settings in setup.json`, ); diff --git a/server/modules/ingest/srt.ts b/server/modules/ingest/srt.ts index 847b6ff..2a1f32f 100644 --- a/server/modules/ingest/srt.ts +++ b/server/modules/ingest/srt.ts @@ -24,7 +24,7 @@ function runSLT() { try { const stats = JSON.parse(data.toString("utf8")); ingestStats = `${Math.round(stats.recv.mbitRate * 1024)} Kbps, ${Math.round(stats.link.rtt)} ms RTT`; - } catch (err) {} + } catch (_err) {} }); proc.stderr.on("data", (data) => { diff --git a/server/modules/modems/modem-network-scan.ts b/server/modules/modems/modem-network-scan.ts index fc25777..8738b45 100644 --- a/server/modules/modems/modem-network-scan.ts +++ b/server/modules/modems/modem-network-scan.ts @@ -22,10 +22,10 @@ import { broadcastMsg } from "../ui/websocket-server.ts"; import { mmNetworkScan } from "./mmcli.ts"; import { type AvailableNetwork, - type Modem, getAvailableNetworksForModem, getModem, getModemIds, + type Modem, } from "./modems-state.ts"; function modemBuildAvailableNetworksMessage(id: number) { diff --git a/server/modules/modems/modem-status.ts b/server/modules/modems/modem-status.ts index 72fb21a..41aca3f 100644 --- a/server/modules/modems/modem-status.ts +++ b/server/modules/modems/modem-status.ts @@ -23,11 +23,11 @@ import { broadcastMsg } from "../ui/websocket-server.ts"; import type { ModemId } from "./mmcli.ts"; import { type AvailableNetwork, - type Modem, - type ModemConfig, getAvailableNetworksForModem, getModem, getModemIds, + type Modem, + type ModemConfig, } from "./modems-state.ts"; type ModemsResponseModemStatus = { diff --git a/server/modules/modems/modem-update-loop.ts b/server/modules/modems/modem-update-loop.ts index 7ee3b08..359bd3f 100644 --- a/server/modules/modems/modem-update-loop.ts +++ b/server/modules/modems/modem-update-loop.ts @@ -22,8 +22,8 @@ import { type NetworkManagerConnection, type NetworkManagerConnectionModemConfig, nmConnAdd, - nmConnGetFields, nmConnect, + nmConnGetFields, } from "../network/network-manager.ts"; import { setup } from "../setup.ts"; @@ -32,20 +32,20 @@ import { getGsmConnections, resetGsmConnections } from "./gsm-connections.ts"; import { type ModemId, type ModemInfo, - type SimInfo, mmConvertAccessTech, mmConvertNetworkType, mmConvertNetworkTypes, mmGetModem, mmGetSim, mmList, + type SimInfo, } from "./mmcli.ts"; import { broadcastModems } from "./modem-status.ts"; import { - type Modem, - type ModemConfig, getModem, getModems, + type Modem, + type ModemConfig, removeModem, setModem, } from "./modems-state.ts"; diff --git a/server/modules/modems/modems.ts b/server/modules/modems/modems.ts index 1c2d70d..bab5f66 100644 --- a/server/modules/modems/modems.ts +++ b/server/modules/modems/modems.ts @@ -35,7 +35,7 @@ import { mmSetNetworkTypes } from "./mmcli.ts"; import { modemNetworkScan } from "./modem-network-scan.ts"; import { broadcastModems } from "./modem-status.ts"; import { sanitizeModemConfigForNetworkManager } from "./modem-update-loop.ts"; -import { type ModemConfig, getModem } from "./modems-state.ts"; +import { getModem, type ModemConfig } from "./modems-state.ts"; type ModemConfigMessage = { config: { @@ -71,7 +71,7 @@ async function updateModemConnection( } async function handleModemConfig( - conn: WebSocket, + _conn: WebSocket, msg: ModemConfigMessage["config"], ) { if (!msg.device) { @@ -186,7 +186,10 @@ async function handleModemConfig( broadcastModems({ [msg.device]: true }); } -async function handleModemScan(conn: WebSocket, msg: ModemScanMessage["scan"]) { +async function handleModemScan( + _conn: WebSocket, + msg: ModemScanMessage["scan"], +) { const modemId = Number.parseInt(msg.device, 10); if (!msg || !getModem(modemId)) return; diff --git a/server/modules/network/dns.ts b/server/modules/network/dns.ts index df4b56e..23d148b 100644 --- a/server/modules/network/dns.ts +++ b/server/modules/network/dns.ts @@ -117,7 +117,7 @@ let dnsCache: Record = {}; const dnsResults: Record = {}; try { dnsCache = JSON.parse(fs.readFileSync(DNS_CACHE_FILE, "utf8")); -} catch (err) { +} catch (_err) { logger.warn( "Failed to load the persistent DNS cache, starting with an empty cache", ); diff --git a/server/modules/network/gateways.ts b/server/modules/network/gateways.ts index 48699f9..cf0455f 100644 --- a/server/modules/network/gateways.ts +++ b/server/modules/network/gateways.ts @@ -16,9 +16,8 @@ */ import { execP } from "../../helpers/exec.ts"; -import { getms } from "../../helpers/time.ts"; - import { logger } from "../../helpers/logger.ts"; +import { getms } from "../../helpers/time.ts"; import { notificationBroadcast, notificationRemove, @@ -41,7 +40,7 @@ async function clear_default_gws() { while (true) { await execP("ip route del default"); } - } catch (err) { + } catch (_err) { return; } } diff --git a/server/modules/network/network-interfaces.ts b/server/modules/network/network-interfaces.ts index 8f0c679..aef9b13 100644 --- a/server/modules/network/network-interfaces.ts +++ b/server/modules/network/network-interfaces.ts @@ -17,15 +17,12 @@ /* Network interface list */ import { exec } from "node:child_process"; - +import { EventEmitter } from "node:events"; import type WebSocket from "ws"; -import { getms } from "../../helpers/time.ts"; - import { logger } from "../../helpers/logger.ts"; import { ACTIVE_TO } from "../../helpers/shared.ts"; - -import { EventEmitter } from "node:events"; +import { getms } from "../../helpers/time.ts"; import { notificationBroadcast, notificationRemove, diff --git a/server/modules/remote/remote-relays.ts b/server/modules/remote/remote-relays.ts index f3da912..cd61a29 100644 --- a/server/modules/remote/remote-relays.ts +++ b/server/modules/remote/remote-relays.ts @@ -93,7 +93,7 @@ try { relaysCache = JSON.parse( fs.readFileSync(RELAYS_CACHE_FILE, "utf8"), ) as RelayCache; -} catch (err) { +} catch (_err) { logger.warn("Failed to load the relays cache, starting with an empty cache"); } @@ -135,7 +135,7 @@ export function buildRelaysMsg() { export async function updateCachedRelays(relays: RelayCache | undefined) { try { assert.deepStrictEqual(relays, relaysCache); - } catch (err) { + } catch (_err) { logger.debug("updated the relays cache", relays); relaysCache = relays; await writeTextFile(RELAYS_CACHE_FILE, JSON.stringify(relays)); @@ -182,7 +182,7 @@ function validateRemoteRelays(msg: ValidateRemoteRelaysMessage["relays"]) { if (Object.keys(out.servers).length < 1) return; return out; - } catch (err) { + } catch (_err) { return undefined; } } diff --git a/server/modules/remote/remote.ts b/server/modules/remote/remote.ts index 80239a8..d68c455 100644 --- a/server/modules/remote/remote.ts +++ b/server/modules/remote/remote.ts @@ -52,16 +52,17 @@ import { broadcastMsgLocal, deleteSocketSenderId, getLastActive, + handleMessage, + type Message, markConnectionActive, setSocketSenderId, } from "../ui/websocket-server.ts"; -import { type Message, handleMessage } from "../ui/websocket-server.ts"; import { - type ValidateRemoteRelaysMessage, buildRelaysMsg, handleRemoteRelays, updateCachedRelays, + type ValidateRemoteRelaysMessage, } from "./remote-relays.ts"; type RemoteAuthEncoderMessage = { @@ -78,7 +79,7 @@ const remoteEndpointPath = setup.remote_endpoint_path ?? "/ws/remote"; const remoteTimeout = 5000; const remoteConnectTimeout = 10000; -let remoteWs: WebSocket | undefined = undefined; +let remoteWs: WebSocket | undefined; let remoteStatusHandled = false; export function getRemoteWebSocket() { @@ -194,7 +195,7 @@ async function remoteConnect() { queueUpdateGw(); logger.warn(`remote: DNS lookup failed, using cached address ${host}`); } - } catch (err) { + } catch (_err) { return remoteRetry(); } diff --git a/server/modules/streaming/audio.ts b/server/modules/streaming/audio.ts index daf2f2f..c6bbf7c 100644 --- a/server/modules/streaming/audio.ts +++ b/server/modules/streaming/audio.ts @@ -29,7 +29,6 @@ import { setup } from "../setup.ts"; import { notificationBroadcast } from "../ui/notifications.ts"; import { broadcastMsg } from "../ui/websocket-server.ts"; -import { resolveSrtla } from "./srtla.ts"; import { startError } from "./streaming.ts"; const deviceDir = setup.sound_device_dir ?? "/sys/class/sound"; diff --git a/server/modules/streaming/camlink.ts b/server/modules/streaming/camlink.ts index 5b1ae4d..ee9d37e 100644 --- a/server/modules/streaming/camlink.ts +++ b/server/modules/streaming/camlink.ts @@ -55,7 +55,7 @@ export async function checkCamlinkUsb2() { if (!version.match("3.00")) { foundUsb2 = true; } - } catch (err) {} + } catch (_err) {} } if (foundUsb2) { diff --git a/server/modules/streaming/srtla.ts b/server/modules/streaming/srtla.ts index 57d3f08..72431ce 100644 --- a/server/modules/streaming/srtla.ts +++ b/server/modules/streaming/srtla.ts @@ -39,7 +39,7 @@ export async function resolveSrtla(addr: string, conn: WebSocket) { const res = await dnsCacheResolve(addr, "a"); addrs = res.addrs; fromCache = res.fromCache; - } catch (err) { + } catch (_err) { const senderId = getSocketSenderId(conn) ?? "unknown sender"; startError(conn, `failed to resolve SRTLA addr ${addr}`, senderId); queueUpdateGw(); diff --git a/server/modules/streaming/streaming.ts b/server/modules/streaming/streaming.ts index 5e661e7..f78c563 100644 --- a/server/modules/streaming/streaming.ts +++ b/server/modules/streaming/streaming.ts @@ -21,6 +21,10 @@ import type WebSocket from "ws"; import { validateInteger, validatePortNo } from "../../helpers/number.ts"; import { getConfig, saveConfig } from "../config.ts"; +import { + convertManualToRemoteRelay, + getRelays, +} from "../remote/remote-relays.ts"; import { notificationSend } from "../ui/notifications.ts"; import type { StatusResponseMessage } from "../ui/status.ts"; import { @@ -30,17 +34,12 @@ import { getSocketSenderId, setSocketSenderId, } from "../ui/websocket-server.ts"; - import { - convertManualToRemoteRelay, - getRelays, -} from "../remote/remote-relays.ts"; -import { - DEFAULT_AUDIO_ID, abortAsrcRetry, asrcProbe, asrcScheduleRetry, audioCodecs, + DEFAULT_AUDIO_ID, getAudioDevices, isAsrcRetryScheduled, pipelineSetAsrc, diff --git a/server/modules/system/revisions.ts b/server/modules/system/revisions.ts index d2fd136..ecb482f 100644 --- a/server/modules/system/revisions.ts +++ b/server/modules/system/revisions.ts @@ -28,7 +28,7 @@ const revisions: Record = {}; function readRevision(cmd: string) { try { return execSync(cmd).toString().trim(); - } catch (err) { + } catch (_err) { return "unknown revision"; } } @@ -36,7 +36,7 @@ function readRevision(cmd: string) { export function initRevisions() { try { revisions.belaUI = fs.readFileSync("revision", "utf8"); - } catch (err) { + } catch (_err) { revisions.belaUI = readRevision("git rev-parse --short HEAD"); } @@ -51,7 +51,7 @@ export function initRevisions() { revisions["BELABOX image"] = fs .readFileSync("/etc/belabox_img_version", "utf8") .trim(); - } catch (err) {} + } catch (_err) {} logger.debug("Revisions", revisions); } diff --git a/server/modules/system/sensors.ts b/server/modules/system/sensors.ts index 169f421..0a99075 100644 --- a/server/modules/system/sensors.ts +++ b/server/modules/system/sensors.ts @@ -50,7 +50,7 @@ function updateSensorThermal(id: number, name: string) { ); const socTemp = Number.parseInt(socTempStr, 10) / 1000.0; sensors[name] = `${socTemp.toFixed(1)} °C`; - } catch (err) {} + } catch (_err) {} } function updateSensorsJetson() { @@ -61,7 +61,7 @@ function updateSensorsJetson() { ); const socVoltage = Number.parseInt(socVoltageStr, 10) / 1000.0; sensors["SoC voltage"] = `${socVoltage.toFixed(3)} V`; - } catch (err) {} + } catch (_err) {} try { const socCurrentStr = fs.readFileSync( @@ -70,7 +70,7 @@ function updateSensorsJetson() { ); const socCurrent = Number.parseInt(socCurrentStr, 10) / 1000.0; sensors["SoC current"] = `${socCurrent.toFixed(3)} A`; - } catch (err) {} + } catch (_err) {} updateSensorThermal(0, "SoC temperature"); } diff --git a/server/modules/system/ssh.ts b/server/modules/system/ssh.ts index a36b66d..cf6d29d 100644 --- a/server/modules/system/ssh.ts +++ b/server/modules/system/ssh.ts @@ -129,7 +129,7 @@ export function resetSshPassword(conn: WebSocket) { const password = crypto .randomBytes(24) .toString("base64") - .replace(/[+\/=]/g, "") + .replace(/[+/=]/g, "") .substring(0, 20); const cmd = `printf "${password}\n${password}" | passwd ${setup.ssh_user}`; exec(cmd, (err) => { diff --git a/server/modules/ui/auth.ts b/server/modules/ui/auth.ts index 01a66fd..52079a0 100644 --- a/server/modules/ui/auth.ts +++ b/server/modules/ui/auth.ts @@ -49,7 +49,7 @@ const tempTokens: Record = {}; let persistentTokens: Record; try { persistentTokens = JSON.parse(fs.readFileSync(AUTH_TOKENS_FILE, "utf8")); -} catch (err) { +} catch (_err) { persistentTokens = {}; } diff --git a/server/modules/ui/notifications.ts b/server/modules/ui/notifications.ts index c3f1289..a63d6ca 100644 --- a/server/modules/ui/notifications.ts +++ b/server/modules/ui/notifications.ts @@ -29,10 +29,8 @@ */ import type WebSocket from "ws"; - -import { getms } from "../../helpers/time.ts"; - import { logger } from "../../helpers/logger.ts"; +import { getms } from "../../helpers/time.ts"; import { broadcastMsg, buildMsg, diff --git a/server/modules/ui/websocket-server.ts b/server/modules/ui/websocket-server.ts index ccda51a..17770dd 100644 --- a/server/modules/ui/websocket-server.ts +++ b/server/modules/ui/websocket-server.ts @@ -19,24 +19,22 @@ import { spawnSync } from "node:child_process"; import type WebSocket from "ws"; import { WebSocketServer } from "ws"; - +import { logger } from "../../helpers/logger.ts"; import { getms } from "../../helpers/time.ts"; import { extractMessage } from "../../helpers/types.ts"; - -import { logger } from "../../helpers/logger.ts"; -import { type ModemsMessage, handleModems } from "../modems/modems.ts"; +import { handleModems, type ModemsMessage } from "../modems/modems.ts"; import { - type NetworkInterfaceMessage, handleNetif, + type NetworkInterfaceMessage, } from "../network/network-interfaces.ts"; import { getRemoteWebSocket, setRemoteKey } from "../remote/remote.ts"; import { type BitrateParams, setBitrate } from "../streaming/encoder.ts"; -import { type StartMessage, getIsStreaming } from "../streaming/streaming.ts"; +import { getIsStreaming, type StartMessage } from "../streaming/streaming.ts"; import { start, stop } from "../streaming/streamloop.ts"; import { getLog } from "../system/logs.ts"; import { isUpdating, startSoftwareUpdate } from "../system/software-updates.ts"; import { resetSshPassword, startStopSsh } from "../system/ssh.ts"; -import { type WifiMessage, handleWifi } from "../wifi/wifi.ts"; +import { handleWifi, type WifiMessage } from "../wifi/wifi.ts"; import { type AuthMessage, getPasswordHash, diff --git a/server/modules/wifi/wifi-connections.ts b/server/modules/wifi/wifi-connections.ts index 38907bb..cce5502 100644 --- a/server/modules/wifi/wifi-connections.ts +++ b/server/modules/wifi/wifi-connections.ts @@ -17,13 +17,13 @@ import { type MacAddress, + nmcliParseSep, nmRescan, nmScanResults, - nmcliParseSep, } from "../network/network-manager.ts"; +import { wifiBroadcastState } from "./wifi.ts"; import { wifiDeviceListGetMacAddress } from "./wifi-device-list.ts"; import type { WifiInterface } from "./wifi-interfaces.ts"; -import { wifiBroadcastState } from "./wifi.ts"; const wifiInterfacesByMacAddress: Record = {}; diff --git a/server/modules/wifi/wifi-hotspot.ts b/server/modules/wifi/wifi-hotspot.ts index 767fee3..f967adb 100644 --- a/server/modules/wifi/wifi-hotspot.ts +++ b/server/modules/wifi/wifi-hotspot.ts @@ -21,21 +21,21 @@ import type WebSocket from "ws"; import { logger } from "../../helpers/logger.ts"; import { getms } from "../../helpers/time.ts"; import { - type WifiChannel, - channelFromNM, - isWifiChannelName, - wifiChannels, -} from "./wifi-channels.ts"; - -import { + nmConnect, nmConnGetFields, nmConnSetFields, nmConnSetWifiMacAddress, - nmConnect, nmDisconnect, nmHotspot, } from "../network/network-manager.ts"; import { buildMsg, getSocketSenderId } from "../ui/websocket-server.ts"; +import { wifiBroadcastState, wifiUpdateSavedConns } from "./wifi.ts"; +import { + channelFromNM, + isWifiChannelName, + type WifiChannel, + wifiChannels, +} from "./wifi-channels.ts"; import { getWifiInterfaceByMacAddress, getWifiInterfacesByMacAddress, @@ -43,11 +43,10 @@ import { } from "./wifi-connections.ts"; import { type BaseWifiInterface, - type WifiInterface, getMacAddressForWifiInterface, + type WifiInterface, wifiUpdateDevices, } from "./wifi-interfaces.ts"; -import { wifiBroadcastState, wifiUpdateSavedConns } from "./wifi.ts"; export type WifiHotspotMessage = { hotspot: { diff --git a/server/modules/wifi/wifi-interfaces.ts b/server/modules/wifi/wifi-interfaces.ts index e719582..e132d9c 100644 --- a/server/modules/wifi/wifi-interfaces.ts +++ b/server/modules/wifi/wifi-interfaces.ts @@ -20,19 +20,23 @@ import { getms } from "../../helpers/time.ts"; import { updateMoblinkRelayInterfaces } from "../network/moblink-relay.ts"; import { - NETIF_ERR_HOTSPOT, getNetworkInterfaces, + NETIF_ERR_HOTSPOT, setNetifHotspot, triggerNetworkInterfacesChange, } from "../network/network-interfaces.ts"; import { type ConnectionUUID, type MacAddress, + nmcliParseSep, nmDeviceProp, nmDevices, - nmcliParseSep, } from "../network/network-manager.ts"; - +import { + type WifiNetwork, + wifiBroadcastState, + wifiUpdateSavedConns, +} from "./wifi.ts"; import { addWifiInterface, getWifiInterfaceByMacAddress, @@ -46,15 +50,10 @@ import { wifiDeviceListGetMacAddress, } from "./wifi-device-list.ts"; import { + isHotspot, type WifiHotspot, type WifiInterfaceWithHotspot, - isHotspot, } from "./wifi-hotspot.ts"; -import { - type WifiNetwork, - wifiBroadcastState, - wifiUpdateSavedConns, -} from "./wifi.ts"; export type SSID = string; export type WifiInterfaceId = number; @@ -147,7 +146,7 @@ export async function wifiUpdateDevices() { "GENERAL.VENDOR,GENERAL.PRODUCT,WIFI-PROPERTIES.AP,WIFI-PROPERTIES.5GHZ,WIFI-PROPERTIES.2GHZ", )) as [string, string, string, string, string]; const vendor = prop[0].replace("Corporation", "").trim(); - const pb = prop[1].match(/[\[(](.+)[\])]/); + const pb = prop[1].match(/[[(](.+)[\])]/); const product = pb ? pb[1] : prop[1]; const newInterface = { diff --git a/server/modules/wifi/wifi.ts b/server/modules/wifi/wifi.ts index 0d74e10..4436c1f 100644 --- a/server/modules/wifi/wifi.ts +++ b/server/modules/wifi/wifi.ts @@ -23,23 +23,22 @@ import type WebSocket from "ws"; import { logger } from "../../helpers/logger.ts"; import { extractMessage } from "../../helpers/types.ts"; -import { getWifiChannelMap } from "./wifi-channels.ts"; - import { type ConnectionUUID, nmConnDelete, + nmConnect, nmConnGetFields, nmConnSetWifiMacAddress, - nmConnect, nmConnsGet, - nmDisconnect, nmcliParseSep, + nmDisconnect, } from "../network/network-manager.ts"; import { broadcastMsg, buildMsg, getSocketSenderId, } from "../ui/websocket-server.ts"; +import { getWifiChannelMap } from "./wifi-channels.ts"; import { getWifiInterfaceByMacAddress, getWifiInterfacesByMacAddress, @@ -48,21 +47,21 @@ import { wifiUpdateScanResult, } from "./wifi-connections.ts"; import { - type WifiHotspot, - type WifiHotspotMessage, canHotspot, handleHotspotConn, isHotspot, + type WifiHotspot, + type WifiHotspotMessage, wifiHotspotConfig, wifiHotspotStart, wifiHotspotStop, } from "./wifi-hotspot.ts"; import { type BaseWifiInterface, - type SSID, - type WifiInterfaceId, getMacAddressForWifiInterface, getWifiIdToMacAddress, + type SSID, + type WifiInterfaceId, } from "./wifi-interfaces.ts"; type WifiConnectMessage = { diff --git a/server/package.json b/server/package.json index ecd04e1..967c8cc 100644 --- a/server/package.json +++ b/server/package.json @@ -28,5 +28,7 @@ "format": "bun x --bun @biomejs/biome format --write .", "lint": "bun x --bun @biomejs/biome lint --write ." }, - "trustedDependencies": ["@biomejs/biome"] + "trustedDependencies": [ + "@biomejs/biome" + ] } diff --git a/ui/src/main.ts b/ui/src/main.ts index 2bf1036..d22e024 100644 --- a/ui/src/main.ts +++ b/ui/src/main.ts @@ -30,8 +30,8 @@ import "bootstrap/js/dist/modal.js"; import "bootstrap/js/dist/collapse.js"; import "bootstrap/js/dist/tooltip.js"; -import { initRemoteRelays } from "./modules/remote/remote-relays.ts"; import { initRemote } from "./modules/remote/remote.ts"; +import { initRemoteRelays } from "./modules/remote/remote-relays.ts"; import { initPipelines } from "./modules/streaming/pipelines.ts"; import { initStreamingUi } from "./modules/streaming/streaming.ts"; import { initSoftwareUpdate } from "./modules/system/software-update.ts";