Skip to content

Commit 71a19e8

Browse files
support better-auth in preparation of authors (#387)
1 parent d769b08 commit 71a19e8

File tree

18 files changed

+6852
-7089
lines changed

18 files changed

+6852
-7089
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ pnpm-debug.log*
2121
.DS_Store
2222

2323
.wrangler
24+
25+
.dev.vars

.vscode/extensions.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2-
"recommendations": ["astro-build.astro-vscode", "biomejs.biome"],
3-
"unwantedRecommendations": []
2+
"recommendations": [
3+
"astro-build.astro-vscode",
4+
"biomejs.biome"
5+
],
6+
"unwantedRecommendations": [],
47
}

.vscode/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"[astro]": {
3+
"editor.defaultFormatter": "astro-build.astro-vscode"
4+
},
5+
"[json]": {
6+
"editor.defaultFormatter": "biomejs.biome"
7+
},
8+
"[jsonc]": {
9+
"editor.defaultFormatter": "biomejs.biome"
10+
},
11+
"[typescript]": {
12+
"editor.defaultFormatter": "biomejs.biome"
13+
},
14+
}

astro.config.mjs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { dirname, resolve } from 'node:path';
33
import { fileURLToPath } from 'node:url';
44
import cloudflare from '@astrojs/cloudflare';
55
import starlight from '@astrojs/starlight';
6-
import { defineConfig } from 'astro/config';
6+
import { defineConfig, envField } from 'astro/config';
77

88
export default defineConfig({
99
site: process.env.DEPLOY_URL ?? 'https://astro-tips.dev',
@@ -14,6 +14,7 @@ export default defineConfig({
1414
},
1515
integrations: [
1616
starlight({
17+
prerender: true,
1718
title: 'Astro Tips',
1819
logo: {
1920
light: './src/assets/logo-light.svg',
@@ -62,6 +63,7 @@ export default defineConfig({
6263
components: {
6364
PageTitle: './src/components/starlight/PageTitle.astro',
6465
MarkdownContent: './src/components/starlight/MarkdownContent.astro',
66+
ThemeSelect: './src/components/starlight/ThemeSelect.astro',
6567
},
6668
credits: true,
6769
}),
@@ -79,11 +81,23 @@ export default defineConfig({
7981
external: [...builtinModules, ...builtinModules.map((mod) => `node:${mod}`)],
8082
},
8183
},
82-
output: 'server',
84+
output: 'static',
8385
adapter: cloudflare({
8486
imageService: 'passthrough',
8587
platformProxy: {
8688
enabled: true,
89+
experimental: {
90+
remoteBindings: true
91+
}
8792
},
8893
}),
94+
// env: {
95+
// validateSecrets: true,
96+
// schema: {
97+
// BETTER_AUTH_SECRET: envField.string({
98+
// context: "server",
99+
// access: "secret",
100+
// })
101+
// }
102+
// }
89103
});

package.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,30 @@
1515
"lint:fix": "biome check --apply .",
1616
"cf-typegen": "wrangler types --include-runtime --include-env"
1717
},
18-
"dependencies": {
18+
"devDependencies": {
1919
"@astrojs/check": "0.9.4",
2020
"@astrojs/cloudflare": "12.6.0",
2121
"@astrojs/starlight": "0.34.4",
22-
"astro": "5.10.2",
23-
"semver": "7.7.2",
24-
"sharp": "0.34.2",
25-
"starlight-package-managers": "0.11.0",
26-
"typescript": "5.8.3"
27-
},
28-
"devDependencies": {
2922
"@biomejs/biome": "2.0.6",
3023
"@types/mdast": "4.0.4",
3124
"@types/node": "22.16.0",
3225
"@types/semver": "7.7.0",
26+
"astro": "5.10.2",
27+
"better-auth": "1.2.12",
28+
"kysely-d1": "0.4.0",
3329
"mdast-util-mdx": "3.0.0",
3430
"mdast-util-to-markdown": "2.1.2",
3531
"prettier": "3.6.2",
3632
"prettier-plugin-astro": "0.14.1",
33+
"semver": "7.7.2",
34+
"sharp": "0.34.2",
35+
"starlight-package-managers": "0.11.0",
36+
"typescript": "5.8.3",
3737
"wrangler": "4.22.0"
38+
},
39+
"overrides": {
40+
"@astrojs/cloudflare": {
41+
"wrangler": "4.22.0"
42+
}
3843
}
3944
}

0 commit comments

Comments
 (0)