Skip to content

Commit

Permalink
chore: cleanup using knip
Browse files Browse the repository at this point in the history
  • Loading branch information
justmoon committed Sep 22, 2024
1 parent 01b2653 commit c10a65f
Show file tree
Hide file tree
Showing 31 changed files with 102 additions and 581 deletions.
31 changes: 20 additions & 11 deletions knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,40 @@
"$schema": "https://unpkg.com/knip@5/schema.json",
"workspaces": {
".": {
"entry": [".meta-updater/main.mjs"],
"ignoreDependencies": ["@dassie/eslint-plugin"]
"entry": [".meta-updater/main.mjs"]
},
"packages/*": {
"entry": ["src/examples/**/*.{js,ts}"]
"entry": ["bin/**/*.{js,ts}", "src/examples/**/*.{js,ts}"]
},
"packages/app-dassie": {
"entry": ["src/command-line/entry.ts"]
},
"packages/app-dev": {
"entry": [
"uno.config.ts",
"bin/*.ts",
"src/runner/runner.js",
"src/runner/launchers/*.ts"
],
]
},
"packages/app-website": {
"ignoreDependencies": ["sharp"]
},
"packages/gui-dassie": {
"entry": ["uno.config.ts"],
"vite": {
"entry": "src/frontend/index.tsx"
"entry": "src/index.tsx",
"config": "vite.config.ts"
},
"ignoreDependencies": ["virtual:uno.css", "virtual:unocss-devtools"]
"ignoreDependencies": ["virtual:uno.css"]
},
"packages/app-node": {
"entry": ["src/frontend/uno.config.ts"],
"packages/gui-dev": {
"entry": ["uno.config.ts"],
"vite": {
"entry": "src/frontend/index.tsx",
"config": "src/frontend/vite.config.ts"
"entry": "src/index.tsx",
"config": "vite.config.ts"
},
"ignoreDependencies": ["virtual:uno.css"]
"ignoreDependencies": ["virtual:uno.css", "virtual:unocss-devtools"]
},
"packages/meta-eslint-config": {
"eslint": {
Expand Down
30 changes: 1 addition & 29 deletions packages/app-dassie/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,62 +23,34 @@
"@dassie/lib-reactive-io": "workspace:^",
"@dassie/lib-reactive-rpc": "workspace:^",
"@dassie/lib-rpc": "workspace:^",
"@dassie/lib-rpc-react": "workspace:^",
"@dassie/lib-sqlite": "workspace:^",
"@dassie/lib-terminal-graphics": "workspace:^",
"@dassie/lib-type-utils": "workspace:^",
"@dassie/lib-x509": "workspace:^",
"@dassie/meta-unocss-config": "workspace:^",
"@hookform/resolvers": "^3.9.0",
"@noble/curves": "^1.5.0",
"@noble/ed25519": "^2.0.0",
"@noble/hashes": "^1.3.2",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-navigation-menu": "^1.2.0",
"@radix-ui/react-scroll-area": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-toast": "^1.2.1",
"@scure/bip39": "^1.2.1",
"@tanstack/react-query": "^5.52.1",
"@tanstack/react-virtual": "^3.10.4",
"@unocss/reset": "0.62.2",
"acme-client": "^5.4.0",
"anser": "^2.1.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cmd-ts": "^0.13.0",
"cookie": "^0.6.0",
"denque": "^2.1.0",
"env-paths": "^3.0.0",
"execa": "^9.3.1",
"ilp-protocol-stream": "2.7.2-alpha.2",
"immer": "^10.1.1",
"lucide-react": "^0.435.0",
"nanoid": "^5.0.7",
"p-map": "^7.0.2",
"pretty-format": "^29.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.0",
"react-number-format": "^5.4.0",
"superjson": "^2.2.1",
"tailwind-merge": "^2.5.2",
"uint8array-extras": "^1.4.0",
"unocss": "0.62.2",
"wouter": "3.3.4",
"xrpl": "^3.1.0",
"zod": "^3.23.8",
"zustand": "^4.5.5"
"zod": "^3.23.8"
},
"devDependencies": {
"@dassie/meta-tsconfig": "workspace:^",
"@types/cookie": "^0.6.0",
"@types/node": "^22.5.5",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"type-fest": "^4.25.0",
"vite": "^5.4.2"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { createServer } from "node:http"

import { createNodejsHttpHandlers, createRouter } from "@dassie/lib-http-server"
import { createNodejsHttpHandlers } from "@dassie/lib-http-server"
import { createActor } from "@dassie/lib-reactive"

import type { SystemdReactor } from "."
import { HttpRouter } from "../../../../http-server/values/http-router"
import { http as logger } from "../../../../logger/instances"
import { getSocketActivationFileDescriptors } from "./socket-activation"

export const HttpRouter = () => createRouter()

function handleError(error: unknown) {
logger.error("http server error", { error })
}

export const SOCKET_ACTIVATION_NAME_HTTP = "dassie-http.socket"
const SOCKET_ACTIVATION_NAME_HTTP = "dassie-http.socket"

export const ServeHttpActor = (reactor: SystemdReactor) => {
const router = reactor.use(HttpRouter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function handleError(error: unknown) {
logger.error("https server error", { error })
}

export const SOCKET_ACTIVATION_NAME_HTTPS = "dassie-https.socket"
const SOCKET_ACTIVATION_NAME_HTTPS = "dassie-https.socket"

export const ServeHttpsActor = (reactor: SystemdReactor) => {
const httpsRouter = reactor.use(HttpsRouter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ServeLocalIpcActor } from "../../../../local-ipc-server/actors/serve-lo
import { ipc as logger } from "../../../../logger/instances"
import { getSocketActivationFileDescriptors } from "./socket-activation"

export const SOCKET_ACTIVATION_NAME_IPC = "dassie-ipc.socket"
const SOCKET_ACTIVATION_NAME_IPC = "dassie-ipc.socket"

function handleError(error: unknown) {
logger.error("local ipc server error", { error })
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import { createServer } from "node:http"

import { createNodejsHttpHandlers, createRouter } from "@dassie/lib-http-server"
import { createNodejsHttpHandlers } from "@dassie/lib-http-server"
import { type Reactor, createActor } from "@dassie/lib-reactive"

import { DatabaseConfigStore } from "../../../../config/database-config"
import { HttpRouter } from "../../../../http-server/values/http-router"
import { http as logger } from "../../../../logger/instances"

export const HttpRouter = () => createRouter()

function handleError(error: unknown) {
logger.error("http server error", { error })
}

export const SOCKET_ACTIVATION_NAME_HTTP = "dassie-http.socket"

export const ServeHttpActor = (reactor: Reactor) => {
const router = reactor.use(HttpRouter)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ function handleError(error: unknown) {
logger.error("https server error", { error })
}

export const SOCKET_ACTIVATION_NAME_HTTPS = "dassie-https.socket"

export const ServeHttpsActor = (reactor: DassieReactor) => {
const httpsRouter = reactor.use(HttpsRouter)
const websocketRouter = reactor.use(HttpsWebSocketRouter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { EnvironmentConfig } from "../../../../config/environment-config"
import { ServeLocalIpcActor } from "../../../../local-ipc-server/actors/serve-local-ipc"
import { ipc as logger } from "../../../../logger/instances"

export const SOCKET_ACTIVATION_NAME_IPC = "dassie-ipc.socket"
export const ServeIpcSocketActor = (reactor: Reactor) => {
const serveLocalIpcActor = reactor.use(ServeLocalIpcActor)
const { ipcSocketPath } = reactor.use(EnvironmentConfig)
Expand Down
12 changes: 5 additions & 7 deletions packages/app-dassie/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"extends": "@dassie/meta-tsconfig/vite-node.json",
"include": ["**/*.ts", "**/*.tsx", "**/*.js"],
"include": [
"**/*.ts",
"**/*.tsx",
"**/*.js"
],
"references": [
{
"path": "../lib-format-utils"
Expand Down Expand Up @@ -35,9 +39,6 @@
{
"path": "../lib-rpc"
},
{
"path": "../lib-rpc-react"
},
{
"path": "../lib-sqlite"
},
Expand All @@ -49,9 +50,6 @@
},
{
"path": "../lib-x509"
},
{
"path": "../meta-unocss-config"
}
],
"compilerOptions": {
Expand Down
16 changes: 0 additions & 16 deletions packages/app-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,21 @@
"@dassie/lib-reactive-io": "workspace:^",
"@dassie/lib-reactive-rpc": "workspace:^",
"@dassie/lib-rpc": "workspace:^",
"@dassie/lib-rpc-react": "workspace:^",
"@dassie/lib-sqlite": "workspace:^",
"@dassie/lib-type-utils": "workspace:*",
"@dassie/lib-x509": "workspace:*",
"@dassie/meta-unocss-config": "workspace:^",
"@noble/hashes": "^1.3.2",
"@react-hook/size": "^2.1.2",
"@scure/bip39": "^1.2.1",
"@tanstack/react-query": "^5.52.1",
"@types/wtfnode": "^0.7.3",
"@vitejs/plugin-react": "^4.3.1",
"chalk": "^5.3.0",
"connect-history-api-fallback": "^2.0.0",
"execa": "^9.3.1",
"immer": "^10.1.1",
"launch-editor": "^2.8.1",
"lucide-react": "^0.435.0",
"p-defer": "^4.0.1",
"p-timeout": "^6.1.2",
"pure-rand": "^6.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-force-graph-2d": "^1.25.5",
"react-string-replace": "^1.1.1",
"superjson": "^2.2.1",
"unocss": "0.62.2",
"vite": "^5.4.2",
"wouter": "3.3.4",
"ws": "^8.18.0",
"wtfnode": "^0.9.3",
"zod": "^3.23.8"
Expand All @@ -58,11 +45,8 @@
"@types/express": "^4.17.21",
"@types/node": "^22.5.5",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/serve-static": "^1.15.7",
"@types/ws": "^8.5.12",
"express": "^4.18.2",
"serve-static": "^1.15.0",
"type-fest": "^4.25.0",
"vite-node": "^2.0.5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/app-dev/src/runner/actors/serve-https.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { http as logger } from "@dassie/app-dassie/src/logger/instances"
import { createNodejsHttpHandlers } from "@dassie/lib-http-server"
import { createActor } from "@dassie/lib-reactive"

export type ExpressMiddleware = RequestHandler
type ExpressMiddleware = RequestHandler

const walletPath = new URL("../../../../gui-dassie", import.meta.url).pathname

Expand Down
12 changes: 5 additions & 7 deletions packages/app-dev/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"extends": "@dassie/meta-tsconfig/vite-node.json",
"include": ["**/*.js", "**/*.ts", "**/*.tsx"],
"include": [
"**/*.js",
"**/*.ts",
"**/*.tsx"
],
"compilerOptions": {
"outDir": "dist"
},
Expand Down Expand Up @@ -29,9 +33,6 @@
{
"path": "../lib-rpc"
},
{
"path": "../lib-rpc-react"
},
{
"path": "../lib-sqlite"
},
Expand All @@ -40,9 +41,6 @@
},
{
"path": "../lib-x509"
},
{
"path": "../meta-unocss-config"
}
]
}
3 changes: 0 additions & 3 deletions packages/app-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@
"@dassie/meta-unocss-config": "workspace:^",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@unocss/reset": "0.62.2",
"astro": "4.15.4",
"immer": "^10.1.1",
"lucide-react": "^0.435.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sharp": "^0.33.5",
"typescript": "^5.5.4",
"uint8array-extras": "^1.4.0",
"unocss": "0.62.2"
},
"author": "Stefan Thomas <justmoon@members.fsf.org>",
Expand Down
28 changes: 0 additions & 28 deletions packages/gui-dassie/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,12 @@
"license": "Apache-2.0",
"dependencies": {
"@dassie/app-dassie": "workspace:^",
"@dassie/lib-format-utils": "workspace:^",
"@dassie/lib-http-server": "workspace:^",
"@dassie/lib-logger": "workspace:^",
"@dassie/lib-oer": "workspace:^",
"@dassie/lib-protocol-ildcp": "workspace:^",
"@dassie/lib-protocol-ilp": "workspace:^",
"@dassie/lib-protocol-utils": "workspace:^",
"@dassie/lib-reactive": "workspace:^",
"@dassie/lib-reactive-io": "workspace:^",
"@dassie/lib-reactive-rpc": "workspace:^",
"@dassie/lib-rpc": "workspace:^",
"@dassie/lib-rpc-react": "workspace:^",
"@dassie/lib-sqlite": "workspace:^",
"@dassie/lib-terminal-graphics": "workspace:^",
"@dassie/lib-type-utils": "workspace:^",
"@dassie/lib-x509": "workspace:^",
"@dassie/meta-unocss-config": "workspace:^",
"@hookform/resolvers": "^3.9.0",
"@noble/curves": "^1.5.0",
"@noble/ed25519": "^2.0.0",
"@noble/hashes": "^1.3.2",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-label": "^2.1.0",
Expand All @@ -42,38 +28,24 @@
"@scure/bip39": "^1.2.1",
"@tanstack/react-query": "^5.52.1",
"@tanstack/react-virtual": "^3.10.4",
"@unocss/reset": "0.62.2",
"acme-client": "^5.4.0",
"anser": "^2.1.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cmd-ts": "^0.13.0",
"cookie": "^0.6.0",
"denque": "^2.1.0",
"env-paths": "^3.0.0",
"execa": "^9.3.1",
"ilp-protocol-stream": "2.7.2-alpha.2",
"immer": "^10.1.1",
"lucide-react": "^0.435.0",
"nanoid": "^5.0.7",
"p-map": "^7.0.2",
"pretty-format": "^29.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.0",
"react-number-format": "^5.4.0",
"superjson": "^2.2.1",
"tailwind-merge": "^2.5.2",
"uint8array-extras": "^1.4.0",
"unocss": "0.62.2",
"wouter": "3.3.4",
"xrpl": "^3.1.0",
"zod": "^3.23.8",
"zustand": "^4.5.5"
},
"devDependencies": {
"@dassie/meta-tsconfig": "workspace:^",
"@types/cookie": "^0.6.0",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
Expand Down
Loading

0 comments on commit c10a65f

Please sign in to comment.