Fix SQLite database path to match emdash init location

The emdash CLI creates the database at ./data.db relative to the
workspace root (/app/emdash/data.db), but the Astro config was
pointing to ./storage/data.db. This caused getEmDashEntry() to
return null since the database used at runtime was empty.

Change db.ts to use file:./data.db instead of file:./storage/data.db

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kunthawat Greethong
2026-05-04 07:33:27 +07:00
parent 88902c3b38
commit 160115faea
34 changed files with 22385 additions and 3 deletions

21
test-node-modules/.bin/oxfmt Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -z "$NODE_PATH" ]; then
export NODE_PATH="/app/emdash/node_modules/.pnpm/oxfmt@0.34.0/node_modules/oxfmt/bin/node_modules:/app/emdash/node_modules/.pnpm/oxfmt@0.34.0/node_modules/oxfmt/node_modules:/app/emdash/node_modules/.pnpm/oxfmt@0.34.0/node_modules:/app/emdash/node_modules/.pnpm/node_modules"
else
export NODE_PATH="/app/emdash/node_modules/.pnpm/oxfmt@0.34.0/node_modules/oxfmt/bin/node_modules:/app/emdash/node_modules/.pnpm/oxfmt@0.34.0/node_modules/oxfmt/node_modules:/app/emdash/node_modules/.pnpm/oxfmt@0.34.0/node_modules:/app/emdash/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../oxfmt/bin/oxfmt" "$@"
else
exec node "$basedir/../oxfmt/bin/oxfmt" "$@"
fi