diff --git a/.fallowrc.json b/.fallowrc.json index 0568a68..63959e1 100644 --- a/.fallowrc.json +++ b/.fallowrc.json @@ -1,6 +1,8 @@ { "$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/main/schema.json", "entry": ["test/features/*.test.js", "test/unit/*.test.js"], + "ignorePatterns": ["static/**"], + "ignoreUnresolvedImports": ["/**/static/**"], "ignoreDependencies": ["pino"], "ignoreExports": [{ "file": "static/auth-client.js", "exports": ["*"] }] } diff --git a/.gitignore b/.gitignore index 48121cb..77730be 100644 --- a/.gitignore +++ b/.gitignore @@ -36,5 +36,8 @@ coverage/ .tap/ test-results/ +# build artifacts +.version + # worktrees .worktrees/ diff --git a/eslint.config.js b/eslint.config.js index 7cb2650..42c485b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,6 +3,9 @@ import globals from "globals"; import { defineConfig } from "eslint/config"; export default defineConfig([ + { + ignores: ["static/**"], + }, { files: ["**/*.{js,mjs,cjs}"], plugins: { js }, diff --git a/package.json b/package.json index 4ae3ce9..4d1966b 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "db:generate": "npx @better-auth/cli generate --yes", "db:migrate": "npx @better-auth/cli migrate --yes", "fallow": "fallow", + "heroku-postbuild": "node -e \"require('fs').writeFileSync('.version', (process.env.SOURCE_VERSION || 'dev').slice(0, 7))\"", "prettier:check": "prettier --check '**/*.{js,css,md,yml}'", "prettier:write": "prettier --write '**/*.{js,css,md,yml}'", "lint": "eslint .", diff --git a/src/app/components/admin.js b/src/app/components/admin.js index 97dac5a..aa5c5e2 100644 --- a/src/app/components/admin.js +++ b/src/app/components/admin.js @@ -1,65 +1,74 @@ import { html } from "hono/html"; import { formatISO } from "date-fns"; -// Admin users list component export const UsersList = ({ users, total }) => html` -
| Name | -Verified | -Role | -Created | -|
|---|---|---|---|---|
| ${user.name} | -${user.email} | -${user.emailVerified ? "✅" : "❌"} | -- + | ++ ${formatISO(new Date(user.createdAt), { + representation: "date", + })} + | +
No users found.
` + : html`No users found.
+Name: ${user.name}
-Email: ${user.email}
-ID: ${user.id}
-Email Verified: ${user.emailVerified ? "Yes" : "No"}
-- Created: ${format( - new Date(user.createdAt), - "yyyy-MM-dd HH:mm:ss", - )} -
+