mirror of
https://github.com/tale/headplane.git
synced 2026-08-12 06:46:51 +00:00
feat: correct package.json dependencies and remove libsql
This commit is contained in:
@@ -20,8 +20,7 @@ export async function createDbClient(path: string) {
|
||||
throw new Error(`Could not create directory for database at ${realPath}`);
|
||||
}
|
||||
|
||||
// Turn the path into a URL with the file protocol
|
||||
const db = drizzle(`file://${realPath}`);
|
||||
const db = drizzle(realPath);
|
||||
migrate(db, {
|
||||
migrationsFolder: "./drizzle",
|
||||
});
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { inArray } from "drizzle-orm";
|
||||
import { LibSQLDatabase } from "drizzle-orm/libsql/driver-core";
|
||||
import { ChildProcessWithoutNullStreams, spawn } from "node:child_process";
|
||||
import EventEmitter from "node:events";
|
||||
import { access, constants, mkdir, open } from "node:fs/promises";
|
||||
import { getegid, geteuid } from "node:process";
|
||||
import { createInterface, Interface } from "node:readline";
|
||||
|
||||
import { inArray } from "drizzle-orm";
|
||||
import { NodeSQLiteDatabase } from "drizzle-orm/node-sqlite";
|
||||
|
||||
import { HostInfo } from "~/types";
|
||||
import log from "~/utils/log";
|
||||
|
||||
@@ -15,7 +16,7 @@ import { hostInfo } from "./db/schema";
|
||||
export async function createHeadplaneAgent(
|
||||
config: NonNullable<HeadplaneConfig["integration"]>["agent"] | undefined,
|
||||
headscaleUrl: string,
|
||||
db: LibSQLDatabase,
|
||||
db: NodeSQLiteDatabase,
|
||||
) {
|
||||
if (!config?.enabled) {
|
||||
return;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createHash, createHmac } from "node:crypto";
|
||||
|
||||
import { eq, lt, sql } from "drizzle-orm";
|
||||
import { LibSQLDatabase } from "drizzle-orm/libsql/driver";
|
||||
import { NodeSQLiteDatabase } from "drizzle-orm/node-sqlite";
|
||||
import { createCookie } from "react-router";
|
||||
import { ulid } from "ulidx";
|
||||
|
||||
@@ -59,7 +59,7 @@ interface CookiePayload {
|
||||
|
||||
export interface AuthServiceOptions {
|
||||
secret: string;
|
||||
db: LibSQLDatabase;
|
||||
db: NodeSQLiteDatabase;
|
||||
cookie: {
|
||||
name: string;
|
||||
secure: boolean;
|
||||
|
||||
Reference in New Issue
Block a user