MCPcopy Create free account
hub / github.com/Y80/bmm / exitWithDbClose

Function exitWithDbClose

scripts/utils.mjs:128–136  ·  view source on GitHub ↗
(code = 0)

Source from the content-addressed store, hash-verified

126}
127
128export async function exitWithDbClose(code = 0) {
129 const { db } = await import('@/db')
130 if ('end' in db.$client) {
131 await Promise.resolve(db.$client.end())
132 } else if ('close' in db.$client) {
133 await Promise.resolve(db.$client.close())
134 }
135 process.exit(code)
136}
137
138
139export async function declareLocalType() {

Callers 10

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
list-users.mjsFile · 0.90
mainFunction · 0.90
db-init.mjsFile · 0.90
mainFunction · 0.90
mainFunction · 0.90
executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected