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

Function main

scripts/db-push.mjs:6–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { declareLocalType, exitWithDbClose, loadEnv, testDbConnect } from './utils.mjs'
5
6async function main() {
7 await loadEnv()
8 await declareLocalType()
9
10 await spinner('数据库连接中...', async () => {
11 if (!(await testDbConnect())) {
12 echo(chalk.red('❌ 数据库连接失败'))
13 process.exit(1)
14 }
15 })
16
17 await $`pnpm drizzle-kit push --strict --verbose`.pipe(process.stdout)
18 return exitWithDbClose()
19}
20
21main()

Callers 1

db-push.mjsFile · 0.70

Calls 4

loadEnvFunction · 0.90
declareLocalTypeFunction · 0.90
testDbConnectFunction · 0.90
exitWithDbCloseFunction · 0.90

Tested by

no test coverage detected