Files
Spaghet.io/package.json
T
spaghet 80577d6404 feat: serve site content from Appwrite TablesDB with .md fallback
Replace astro:content getCollection() reads in all 9 content pages with
src/lib/content-source.ts: Appwrite TablesDB (spaghet-home database on
appwrite.spaghet.io) first, bundled src/content/*.md fallback on a
cold-cache outage. Blog/project/legal detail pages flip from prerender
to SSR (content now arrives at request time); sitemap keeps every
detail URL via customPages computed from the bundled .md copies.

- src/lib/appwrite.ts: TablesDB service (node-appwrite), markdown
  rendered through Astro's own satteri+shiki pipeline (dual-theme, same
  config as astro.config.mjs) — article HTML verified byte-identical to
  production. Public reads: tables grant read(any), no secret required.
  60s in-process cache, stale-serving on refresh failure.
- src/lib/__tests__/appwrite.test.ts: 11 tests mocking the SDK boundary
  (the SDK binds its own fetch, so global stubs do not intercept it).
- Draft posts now 302 to /blog and drop off listings/RSS/search at
  request time instead of at build time.
- astro check: 0 errors; vitest: 94 pass; build clean; end-to-end
  verified against live Appwrite and against a forced outage.
2026-11-26 19:29:31 -05:00

50 lines
1.5 KiB
JSON

{
"name": "astro-sphere",
"type": "module",
"version": "1.0.0",
"scripts": {
"dev": "dotenv -e .env -- astro dev",
"dev:network": "dotenv -e .env -- astro dev --host",
"start": "dotenv -e .env -- astro dev",
"build": "export RAYON_NUM_THREADS=1 TOKIO_WORKER_THREADS=1; astro check && astro build",
"preview": "dotenv -e .env -- astro preview",
"preview:network": "dotenv -e .env -- astro dev --host",
"astro": "astro",
"test": "export RAYON_NUM_THREADS=1 TOKIO_WORKER_THREADS=1; vitest run",
"test:watch": "export RAYON_NUM_THREADS=1 TOKIO_WORKER_THREADS=1; vitest",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@astrojs/check": "^0.9.10",
"@astrojs/markdown-satteri": "^0.4.3",
"@astrojs/mdx": "^8.0.3",
"@astrojs/node": "^11.1.7",
"@astrojs/rss": "^4.0.19",
"@astrojs/sitemap": "^3.7.4",
"@astrojs/solid-js": "^7.0.2",
"@solidjs/testing-library": "^0.8.10",
"@tailwindcss/typography": "^0.5.10",
"@tailwindcss/vite": "^4.3.3",
"astro": "^7.3.8",
"clsx": "^2.1.0",
"fuse.js": "^7.0.0",
"node-appwrite": "^32.4.0",
"notenv": "^2.0.3",
"rehype-stringify": "^10.0.1",
"remark": "^15.0.1",
"remark-rehype": "^11.1.2",
"sharp": "^0.35.5",
"solid-js": "^1.8.15",
"tailwind-merge": "^3.7.0",
"tailwindcss": "^4.0.0",
"ts-node": "^10.9.2",
"typescript": "^6.0.3",
"vite": "^8.3.4",
"vitest": "^5.0.4"
},
"devDependencies": {
"dotenv-cli": "^10.0.0"
}
}