Clean up imports
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { Extensible } from "./interfaces";
|
||||
|
||||
export type ContentType = string;
|
||||
|
||||
// tx claude https://claude.ai/share/344fc7bd-5321-4763-af2f-b82275e9f865
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { Extensible } from "./interfaces";
|
||||
|
||||
export type HttpCode = {
|
||||
code: number;
|
||||
name: string;
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user