diff --git a/packages/app-build/src/utils/download-file.ts b/packages/app-build/src/utils/download-file.ts index 7eee2520..87077598 100644 --- a/packages/app-build/src/utils/download-file.ts +++ b/packages/app-build/src/utils/download-file.ts @@ -64,6 +64,7 @@ export const downloadFile = async ( throw new Error("Response body is empty") } + // eslint-disable-next-line n/no-unsupported-features/node-builtins await pipeline(Readable.fromWeb(response.body as ReadableStream), writer) { diff --git a/packages/app-cli/index.js b/packages/app-cli/index.js index 4b8075d1..823dd9e3 100644 --- a/packages/app-cli/index.js +++ b/packages/app-cli/index.js @@ -1 +1,4 @@ +#!/usr/bin/env node + +// eslint-disable-next-line no-console console.log(`🐻 Dassie is here!`) diff --git a/packages/app-cli/package.json b/packages/app-cli/package.json index 8d10197b..b87e68f8 100644 --- a/packages/app-cli/package.json +++ b/packages/app-cli/package.json @@ -14,5 +14,8 @@ "license": "Apache-2.0", "engines": { "node": "=22.8.0" + }, + "devDependencies": { + "@dassie/meta-tsconfig": "workspace:^" } } diff --git a/packages/app-cli/tsconfig.json b/packages/app-cli/tsconfig.json new file mode 100644 index 00000000..831a4286 --- /dev/null +++ b/packages/app-cli/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@dassie/meta-tsconfig/vite-node.json", + "include": ["index.js"], + "compilerOptions": { + "outDir": "dist" + }, + "references": [] +} diff --git a/packages/app-dev/src/common/actors/handle-shutdown-signals.ts b/packages/app-dev/src/backend/actors/handle-shutdown-signals.ts similarity index 100% rename from packages/app-dev/src/common/actors/handle-shutdown-signals.ts rename to packages/app-dev/src/backend/actors/handle-shutdown-signals.ts diff --git a/packages/app-dev/src/backend/start.ts b/packages/app-dev/src/backend/start.ts index bb8b9c9a..b207e15f 100644 --- a/packages/app-dev/src/backend/start.ts +++ b/packages/app-dev/src/backend/start.ts @@ -3,9 +3,9 @@ import { ViteNodeServer as ViteNodeServerType } from "vite-node/server" import { createActor, createReactor } from "@dassie/lib-reactive" -import { HandleShutdownSignalsActor } from "../common/actors/handle-shutdown-signals" import { ApplyDebugLoggingScopes } from "./actors/apply-debug-logging-scopes" import { HandleFileChangeActor } from "./actors/handle-file-change" +import { HandleShutdownSignalsActor } from "./actors/handle-shutdown-signals" import { ProxyByHostnameActor } from "./actors/proxy-by-hostname" import { RegisterReactiveLoggerActor } from "./actors/register-reactive-logger" import { RunScenarioActor } from "./actors/run-scenario" diff --git a/packages/app-dev/src/frontend/components/pages/nodes/node-detail.tsx b/packages/app-dev/src/frontend/components/pages/nodes/node-detail.tsx index 9c936e43..f3dd1118 100644 --- a/packages/app-dev/src/frontend/components/pages/nodes/node-detail.tsx +++ b/packages/app-dev/src/frontend/components/pages/nodes/node-detail.tsx @@ -58,7 +58,6 @@ const NodeHeader = ({ nodeId }: BasicNodeElementProperties) => { const createNodeRpcClients = (securityToken: string, nodeId: string) => { const queryClient = new QueryClient() - // eslint-disable-next-line n/no-unsupported-features/node-builtins const websocket = new WebSocket( `wss://${nodeId}.localhost/rpc?token=${securityToken}`, ) diff --git a/packages/app-dev/src/runner/launchers/node.ts b/packages/app-dev/src/runner/launchers/node.ts index 04a40ad6..a18f0dd7 100644 --- a/packages/app-dev/src/runner/launchers/node.ts +++ b/packages/app-dev/src/runner/launchers/node.ts @@ -3,7 +3,7 @@ import { HasTlsSignal } from "@dassie/app-node/src/backend/config/computed/has-t import { createActor, createReactor } from "@dassie/lib-reactive" import { createRuntime } from "@dassie/lib-reactive-io/node" -import { HandleShutdownSignalsActor } from "../../common/actors/handle-shutdown-signals" +import { HandleShutdownSignalsActor } from "../../backend/actors/handle-shutdown-signals" import { ForwardLogsActor } from "../actors/forward-logs" import { ForwardPeerTrafficActor } from "../actors/forward-peer-traffic" import { HandleDisconnectActor } from "../actors/handle-disconnect" diff --git a/packages/app-node/src/command-line/commands/update/index.ts b/packages/app-node/src/command-line/commands/update/index.ts index 5c5d2f55..3ecd2466 100644 --- a/packages/app-node/src/command-line/commands/update/index.ts +++ b/packages/app-node/src/command-line/commands/update/index.ts @@ -3,7 +3,7 @@ import { $ } from "execa" import { access, - cp, // eslint-disable-line n/no-unsupported-features/node-builtins + cp, constants as fsConstants, mkdir, rm, diff --git a/packages/app-node/src/frontend/components/log-viewer/log-viewer.tsx b/packages/app-node/src/frontend/components/log-viewer/log-viewer.tsx index ef19cfc0..38e17fa0 100644 --- a/packages/app-node/src/frontend/components/log-viewer/log-viewer.tsx +++ b/packages/app-node/src/frontend/components/log-viewer/log-viewer.tsx @@ -57,7 +57,6 @@ const LogViewer = ({ const [shouldStick, setShouldStick] = useState(true) const scrollPositionReference = useRef(undefined) const [keywordFilter, setKeywordFilter] = useState("") - const latestLogLine = logs.at(-1) const filteredLogs = useMemo( () => logs.filter((item) => { @@ -78,7 +77,7 @@ const LogViewer = ({ return true }), - [keywordFilter, externalFilter, logs, latestLogLine], + [keywordFilter, externalFilter, logs], ) const virtualizer = useVirtualizer({ diff --git a/packages/app-node/src/frontend/pages/settings/api-keys/api-keys.tsx b/packages/app-node/src/frontend/pages/settings/api-keys/api-keys.tsx index 32c66d3a..d005c96d 100644 --- a/packages/app-node/src/frontend/pages/settings/api-keys/api-keys.tsx +++ b/packages/app-node/src/frontend/pages/settings/api-keys/api-keys.tsx @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition, n/no-unsupported-features/node-builtins */ +/* eslint-disable @typescript-eslint/no-unnecessary-condition */ import { CheckIcon, CopyIcon, EyeIcon, EyeOffIcon, XIcon } from "lucide-react" import { useRef, useState } from "react" diff --git a/packages/app-website/src/components/StreamToy/StreamSimulator/StreamPacketLog/StreamPacketDetails.tsx b/packages/app-website/src/components/StreamToy/StreamSimulator/StreamPacketLog/StreamPacketDetails.tsx deleted file mode 100644 index dbbb0cac..00000000 --- a/packages/app-website/src/components/StreamToy/StreamSimulator/StreamPacketLog/StreamPacketDetails.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import type { StreamPacket } from "@dassie/lib-protocol-stream" -import { isFailure } from "@dassie/lib-type-utils" - -import StreamFrameDetails from "./StreamFrameDetails" -import type { StreamPacketParseFailure } from "./use-parsed-stream-packet" - -interface StreamPacketDetailsProperties { - packet: StreamPacket | StreamPacketParseFailure | undefined - response?: boolean | undefined -} - -export default function StreamPacketDetails({ - packet, - response, -}: StreamPacketDetailsProperties) { - return ( -
- {!packet ? - null - : isFailure(packet) ? -
{packet.reason}
- : <> -
- {response ? "Received Amount" : "Expected Amount"} -
-
{String(packet.amount)}
-
Sequence
-
{String(packet.sequence)}
- {packet.frames.length > 0 ? -
-
Frames
- {packet.frames.map((frame, index) => ( - - ))} -
- :
No frames
} - - } -
- ) -} diff --git a/packages/app-website/src/components/StreamToy/StreamConfigurator/StreamConfigurator.tsx b/packages/app-website/src/components/stream-toy/stream-configurator/stream-configurator.tsx similarity index 90% rename from packages/app-website/src/components/StreamToy/StreamConfigurator/StreamConfigurator.tsx rename to packages/app-website/src/components/stream-toy/stream-configurator/stream-configurator.tsx index 0d97d8d6..9aec510e 100644 --- a/packages/app-website/src/components/StreamToy/StreamConfigurator/StreamConfigurator.tsx +++ b/packages/app-website/src/components/stream-toy/stream-configurator/stream-configurator.tsx @@ -42,24 +42,24 @@ export default function StreamConfigurator({ type="number" id="max_packet_amount" value={String(configuration.maxPacketAmount)} - onChange={(event) => + onChange={(event) => { onConfigurationChange((configuration) => ({ ...configuration, maxPacketAmount: BigInt(event.target.value), })) - } + }} /> + onChange={(event) => { onConfigurationChange((configuration) => ({ ...configuration, latency: Number(event.target.value), })) - } + }} />