This commit is contained in:
2026-03-11 04:44:11 +00:00
parent 2e0009e3ca
commit 78adca7091
14 changed files with 94 additions and 36 deletions
+6 -3
View File
@@ -1,5 +1,8 @@
import { AppData } from "@/src/data/app-data";
import { NSQLITE_TEST_DB_USERS_PORTS, NSQLiteTables } from "@/src/db/types";
import {
NSQLITE_TURBOCI_ADMIN_USERS_PORTS,
NSQLiteTables,
} from "@/src/db/types";
import { User } from "@/src/types";
import BunSQLite from "@moduletrace/bun-sqlite";
import { execSync, ExecSyncOptions } from "child_process";
@@ -11,7 +14,7 @@ type Params = {
export default async function killAllTtydPorts({ user }: Params) {
const user_ports_res = await BunSQLite.select<
NSQLITE_TEST_DB_USERS_PORTS,
NSQLITE_TURBOCI_ADMIN_USERS_PORTS,
(typeof NSQLiteTables)[number]
>({
table: "users_ports",
@@ -28,7 +31,7 @@ export default async function killAllTtydPorts({ user }: Params) {
await killPort({ port: user_port.port });
await BunSQLite.delete<
NSQLITE_TEST_DB_USERS_PORTS,
NSQLITE_TURBOCI_ADMIN_USERS_PORTS,
(typeof NSQLiteTables)[number]
>({
table: "users_ports",