fix(cli): 🚑 Make cli work again (wasn't connecting to database so it would hang)

This commit is contained in:
Jesse Wierzbinski 2024-04-15 22:47:48 -10:00
parent 214f4d5a3e
commit 8b429fada6
No known key found for this signature in database
2 changed files with 9 additions and 2 deletions

View file

@ -2,5 +2,11 @@
"typescript.tsdk": "node_modules/typescript/lib",
"jest.jestCommandLine": "/home/jessew/.bun/bin/bun test",
"jest.rootPath": ".",
"conventionalCommits.scopes": ["database", "frontend", "build", "api"]
"conventionalCommits.scopes": [
"database",
"frontend",
"build",
"api",
"cli"
]
}

3
cli.ts
View file

@ -28,9 +28,10 @@ import {
findFirstUser,
findManyUsers,
} from "~database/entities/User";
import { db } from "~drizzle/db";
import { db, client } from "~drizzle/db";
import { emoji, openIdAccount, status, user } from "~drizzle/schema";
await client.connect();
const args = process.argv;
const filterObjects = <T extends object>(output: T[], fields: string[]) => {