From 9073e38238588a9f3dcf66684a0801de4ad4c716 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Sat, 25 Apr 2026 17:29:18 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20gitignore=E7=98=A6=E8=BA=AB154->21?= =?UTF-8?q?=E8=A1=8C=20+=20migrate=20onnotice=E6=94=B9logger.debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gitignore: 删社区模板倒灌的死分支 (bower/jspm/snowpack/parcel/fusebox /dynamodb/firebase/yarn-v3/sveltekit/vuepress/docusaurus/gatsby/next /nuxt/grunt/eslintcache 等),只留实际命中的 ~20 行。KISS。 migrate: onnotice 从空函数改成 logger.debug,消除最后一处 silent black hole。pg NOTICE 现在会出现在 LOG_LEVEL=debug 下。 --- .gitignore | 159 ++++----------------------------------------- src/cli/migrate.ts | 8 ++- 2 files changed, 21 insertions(+), 146 deletions(-) diff --git a/.gitignore b/.gitignore index c56e5a3..a68cc14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,154 +1,23 @@ -### Custom ### - -# TanStack -.tanstack/ - -# Nitro -.output/ - -# Bun build -*.bun-build - -### Node ### - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories +# Dependencies node_modules/ -jspm_packages/ -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache +# Build output +.output/ +.tanstack/ +.vite/ +out/ +*.bun-build *.tsbuildinfo +vite.config.js.timestamp-* +vite.config.ts.timestamp-* -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files +# Env .env .env.* !.env.example -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache +# Logs +*.log -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist -.output - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Sveltekit cache directory -.svelte-kit/ - -# vitepress build output -**/.vitepress/dist - -# vitepress cache directory -**/.vitepress/cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# Firebase cache directory -.firebase/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v3 -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions - -# Vite files -vite.config.js.timestamp-* -vite.config.ts.timestamp-* -.vite/ +# OS +.DS_Store diff --git a/src/cli/migrate.ts b/src/cli/migrate.ts index d244a32..31441b1 100644 --- a/src/cli/migrate.ts +++ b/src/cli/migrate.ts @@ -23,7 +23,13 @@ export default defineCommand({ const sha256 = (s: string) => Bun.CryptoHasher.hash('sha256', s, 'hex') - const db = drizzle({ connection: { url: env.DATABASE_URL, max: 1, onnotice: () => {} } }) + const db = drizzle({ + connection: { + url: env.DATABASE_URL, + max: 1, + onnotice: (n) => logger.debug('pg notice', { notice: n.message }), + }, + }) try { await db.execute(sql`CREATE SCHEMA IF NOT EXISTS "drizzle"`) await db.execute(sql`