fix schemas and update deps

This commit is contained in:
haetae 2025-11-25 13:52:04 -05:00
parent ef98263ba0
commit ef688a21b7
7 changed files with 789 additions and 930 deletions

View File

@ -7,10 +7,10 @@ import devOnlyRoutes from '@fujocoded/astro-dev-only';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: "https://haetae.32-b.it", site: "http://haetae.32-b.it",
markdown: { markdown: {
remarkPlugins: [modifiedTime], remarkPlugins: [modifiedTime],
smartypants: false, // smartypants: false,
}, },
integrations: [ integrations: [
mdx(), mdx(),
@ -19,9 +19,7 @@ export default defineConfig({
routePatterns: ["/guestbook/admin"] routePatterns: ["/guestbook/admin"]
}), }),
], ],
adapter: node({ adapter: node({ mode: "standalone" }),
mode: "standalone",
}),
env: { env: {
schema: { schema: {
ASTRO_DB_REMOTE_URL: envField.string({ context: "server", access: "secret" }), ASTRO_DB_REMOTE_URL: envField.string({ context: "server", access: "secret" }),

View File

@ -1,4 +1,4 @@
import { sql } from "drizzle-orm"; import { sql, type InferSelectModel } from "drizzle-orm";
import { int, sqliteTable, text } from "drizzle-orm/sqlite-core"; import { int, sqliteTable, text } from "drizzle-orm/sqlite-core";
export const guestbookTable = sqliteTable("guestbook_table", { export const guestbookTable = sqliteTable("guestbook_table", {
@ -9,4 +9,6 @@ export const guestbookTable = sqliteTable("guestbook_table", {
published: text().notNull().default(sql`(CURRENT_TIMESTAMP)`), published: text().notNull().default(sql`(CURRENT_TIMESTAMP)`),
updated: text().$onUpdate(() => sql`(CURRENT_TIMESTAMP)`), updated: text().$onUpdate(() => sql`(CURRENT_TIMESTAMP)`),
reply: text(), reply: text(),
}); });
export type GuestbookEntry = typeof guestbookTable.$inferSelect;

View File

@ -9,20 +9,20 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/mdx": "^4.3.6", "@astrojs/mdx": "^4.3.12",
"@astrojs/node": "9.4.4", "@astrojs/node": "9.5.1",
"@astrojs/rss": "4.0.12", "@astrojs/rss": "4.0.14",
"@fujocoded/astro-dev-only": "0.0.4", "@fujocoded/astro-dev-only": "0.0.4",
"@libsql/client": "^0.15.15", "@libsql/client": "^0.15.15",
"astro": "5.13.10", "astro": "5.16.0",
"astro-breadcrumbs": "^3.3.1", "astro-breadcrumbs": "^3.3.1",
"dayjs": "^1.11.18", "dayjs": "^1.11.19",
"drizzle-orm": "^0.44.5", "drizzle-orm": "^0.44.7",
"isomorphic-dompurify": "^2.28.0", "isomorphic-dompurify": "^2.33.0",
"marked": "^16.3.0" "marked": "^16.4.2"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.18.6", "@types/node": "^22.19.1",
"drizzle-kit": "^0.31.4" "drizzle-kit": "^0.31.7"
} }
} }

1676
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
nodeLinker: hoisted
onlyBuiltDependencies: onlyBuiltDependencies:
- esbuild - esbuild
- sharp - sharp
nodeLinker: hoisted overrides:
esbuild@<=0.24.2: '>=0.25.0'

View File

@ -1,5 +1,5 @@
import { defineAction } from "astro:actions"; import { defineAction } from "astro:actions";
import { z } from "astro:content"; import { z } from "astro:schema";
import DOMPurify from "isomorphic-dompurify"; import DOMPurify from "isomorphic-dompurify";
export const contact = { export const contact = {

View File

@ -1,5 +1,5 @@
import { ActionError, defineAction } from "astro:actions"; import { ActionError, defineAction } from "astro:actions";
import { z } from "astro:content"; import { z } from "astro:schema";
import { db } from "db"; import { db } from "db";
import { guestbookTable } from "db/schema"; import { guestbookTable } from "db/schema";
import { eq } from "drizzle-orm"; import { eq } from "drizzle-orm";