diff --git a/express/auth/service.ts b/express/auth/service.ts index c168b6f..e8d9025 100644 --- a/express/auth/service.ts +++ b/express/auth/service.ts @@ -4,7 +4,7 @@ // password reset, and email verification. import type { Request as ExpressRequest } from "express"; -import { AnonymousUser, type MaybeUser, type User, type UserId } from "../user"; +import { AnonymousUser, type User, type UserId } from "../user"; import { hashPassword, verifyPassword } from "./password"; import type { AuthStore } from "./store"; import { diff --git a/express/content-types.ts b/express/content-types.ts index eca7c72..219ce49 100644 --- a/express/content-types.ts +++ b/express/content-types.ts @@ -1,5 +1,3 @@ -import { Extensible } from "./interfaces"; - export type ContentType = string; // tx claude https://claude.ai/share/344fc7bd-5321-4763-af2f-b82275e9f865 diff --git a/express/database.ts b/express/database.ts index 69f057c..a5b317d 100644 --- a/express/database.ts +++ b/express/database.ts @@ -1,7 +1,8 @@ // database.ts // PostgreSQL database access with Kysely query builder and simple migrations -import * as fs from "fs"; +import * as fs from "node:fs"; +import * as path from "node:path"; import { type Generated, Kysely, @@ -9,7 +10,6 @@ import { type Selectable, sql, } from "kysely"; -import * as path from "path"; import { Pool } from "pg"; import type { AuthStore, diff --git a/express/http-codes.ts b/express/http-codes.ts index 2c12891..912aa8a 100644 --- a/express/http-codes.ts +++ b/express/http-codes.ts @@ -1,5 +1,3 @@ -import { Extensible } from "./interfaces"; - export type HttpCode = { code: number; name: string; diff --git a/express/routes.ts b/express/routes.ts index 7ad3978..63f3060 100644 --- a/express/routes.ts +++ b/express/routes.ts @@ -5,9 +5,9 @@ import { DateTime } from "ts-luxon"; import { authRoutes } from "./auth/routes"; import { contentTypes } from "./content-types"; import { multiHandler } from "./handlers"; -import { HttpCode, httpCodes } from "./http-codes"; +import { httpCodes } from "./http-codes"; import { services } from "./services"; -import { type Call, ProcessedRoute, type Result, type Route } from "./types"; +import type { Call, Result, Route } from "./types"; // FIXME: Obviously put this somewhere else const okText = (result: string): Result => { diff --git a/express/services/index.ts b/express/services/index.ts index 2e854e5..b7daf88 100644 --- a/express/services/index.ts +++ b/express/services/index.ts @@ -1,10 +1,9 @@ // services.ts import { AuthService } from "../auth"; -import { config } from "../config"; import { db, migrate, migrationStatus, PostgresAuthStore } from "../database"; import { getLogs, log } from "../logging"; -import { AnonymousUser, anonymousUser, type User } from "../user"; +import { anonymousUser, type User } from "../user"; const database = { db, diff --git a/express/types.ts b/express/types.ts index ce9b917..528eabc 100644 --- a/express/types.ts +++ b/express/types.ts @@ -2,15 +2,12 @@ // FIXME: split this up into types used by app developers and types internal // to the framework. -import { - type Request as ExpressRequest, - Response as ExpressResponse, -} from "express"; +import type { Request as ExpressRequest } from "express"; import type { MatchFunction } from "path-to-regexp"; import { z } from "zod"; import type { Session } from "./auth/types"; -import { type ContentType, contentTypes } from "./content-types"; -import { type HttpCode, httpCodes } from "./http-codes"; +import type { ContentType } from "./content-types"; +import type { HttpCode } from "./http-codes"; import { AnonymousUser, type MaybeUser,