added supabase auth 640d1fbe
Steve · 2024-09-19 21:38 9 file(s) · +396 −48
astro.config.ts +27 −29
4 4
import sitemap from "@astrojs/sitemap";
5 5
import cloudflare from "@astrojs/cloudflare";
6 6
7 +
import react from "@astrojs/react";
8 +
7 9
// https://astro.build/config
8 10
export default defineConfig({
9 -
	site: "https://stevedylan.dev",
10 -
	outDir: "dist",
11 -
	image: {
12 -
		service: passthroughImageService(),
13 -
	},
14 -
	markdown: {
15 -
		shikiConfig: {
16 -
			theme: "css-variables",
17 -
			wrap: true,
18 -
		},
19 -
	},
20 -
	prefetch: true,
21 -
	integrations: [
22 -
		mdx({}),
23 -
		tailwind({
24 -
			config: {
25 -
				applyBaseStyles: false,
26 -
			},
27 -
		}),
28 -
		sitemap(),
29 -
	],
30 -
	vite: {
31 -
		define: {
32 -
			"process.env.NODE_ENV": `'${process.env.NODE_ENV}'`,
33 -
		},
34 -
	},
35 -
	output: "hybrid",
36 -
	adapter: cloudflare(),
37 -
});
11 +
    site: "https://stevedylan.dev",
12 +
    outDir: "dist",
13 +
    image: {
14 +
        service: passthroughImageService(),
15 +
    },
16 +
    markdown: {
17 +
        shikiConfig: {
18 +
            theme: "css-variables",
19 +
            wrap: true,
20 +
        },
21 +
    },
22 +
    prefetch: true,
23 +
    integrations: [mdx({}), tailwind({
24 +
        config: {
25 +
            applyBaseStyles: false,
26 +
        },
27 +
		}), sitemap(), react()],
28 +
    vite: {
29 +
        define: {
30 +
            "process.env.NODE_ENV": `'${process.env.NODE_ENV}'`,
31 +
        },
32 +
    },
33 +
    output: "hybrid",
34 +
    adapter: cloudflare(),
35 +
});
package.json +7 −0
45 45
	"dependencies": {
46 46
		"@astrojs/cloudflare": "^11.0.5",
47 47
		"@astrojs/partytown": "^2.1.2",
48 +
		"@astrojs/react": "^3.6.2",
48 49
		"@astrojs/rss": "^4.0.7",
49 50
		"@astrojs/ts-plugin": "^1.10.2",
51 +
		"@supabase/ssr": "^0.5.1",
52 +
		"@supabase/supabase-js": "^2.45.4",
53 +
		"@types/react": "^18.3.8",
54 +
		"@types/react-dom": "^18.3.0",
50 55
		"@vercel/analytics": "^0.1.10",
51 56
		"astro": "^4.15.7",
52 57
		"astro-google-analytics": "^1.0.3",
58 +
		"react": "^18.3.1",
59 +
		"react-dom": "^18.3.1",
53 60
		"sharp": "^0.33.1"
54 61
	}
55 62
}
pnpm-lock.yaml +239 −0
14 14
      '@astrojs/partytown':
15 15
        specifier: ^2.1.2
16 16
        version: 2.1.2
17 +
      '@astrojs/react':
18 +
        specifier: ^3.6.2
19 +
        version: 3.6.2(@types/react-dom@18.3.0)(@types/react@18.3.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vite@5.4.6(@types/node@22.5.5))
17 20
      '@astrojs/rss':
18 21
        specifier: ^4.0.7
19 22
        version: 4.0.7
20 23
      '@astrojs/ts-plugin':
21 24
        specifier: ^1.10.2
22 25
        version: 1.10.2
26 +
      '@supabase/ssr':
27 +
        specifier: ^0.5.1
28 +
        version: 0.5.1(@supabase/supabase-js@2.45.4)
29 +
      '@supabase/supabase-js':
30 +
        specifier: ^2.45.4
31 +
        version: 2.45.4
32 +
      '@types/react':
33 +
        specifier: ^18.3.8
34 +
        version: 18.3.8
35 +
      '@types/react-dom':
36 +
        specifier: ^18.3.0
37 +
        version: 18.3.0
23 38
      '@vercel/analytics':
24 39
        specifier: ^0.1.10
25 40
        version: 0.1.11(react@18.3.1)
29 44
      astro-google-analytics:
30 45
        specifier: ^1.0.3
31 46
        version: 1.0.3
47 +
      react:
48 +
        specifier: ^18.3.1
49 +
        version: 18.3.1
50 +
      react-dom:
51 +
        specifier: ^18.3.1
52 +
        version: 18.3.1(react@18.3.1)
32 53
      sharp:
33 54
        specifier: ^0.33.1
34 55
        version: 0.33.5
164 185
    resolution: {integrity: sha512-Z9IYjuXSArkAUx3N6xj6+Bnvx8OdUSHA8YoOgyepp3+zJmtVYJIl/I18GozdJVW1p5u/CNpl3Km7/gwTJK85cw==}
165 186
    engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0}
166 187
188 +
  '@astrojs/react@3.6.2':
189 +
    resolution: {integrity: sha512-fK29lYI7zK/KG4ZBy956x4dmauZcZ18osFkuyGa8r3gmmCQa2NZ9XNu9WaVYEUm0j89f4Gii4tbxLoyM8nk2MA==}
190 +
    engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0}
191 +
    peerDependencies:
192 +
      '@types/react': ^17.0.50 || ^18.0.21
193 +
      '@types/react-dom': ^17.0.17 || ^18.0.6
194 +
      react: ^17.0.2 || ^18.0.0 || ^19.0.0-beta
195 +
      react-dom: ^17.0.2 || ^18.0.0 || ^19.0.0-beta
196 +
167 197
  '@astrojs/rss@4.0.7':
168 198
    resolution: {integrity: sha512-ZEG55XFB19l+DplUvBISmz04UbjDtKliRO4Y5+ERRhAMjgCVVobEBNE6ZwWG1h6orWUocy4nfPihKXDyB73x9g==}
169 199
258 288
259 289
  '@babel/plugin-syntax-jsx@7.24.7':
260 290
    resolution: {integrity: sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==}
291 +
    engines: {node: '>=6.9.0'}
292 +
    peerDependencies:
293 +
      '@babel/core': ^7.0.0-0
294 +
295 +
  '@babel/plugin-transform-react-jsx-self@7.24.7':
296 +
    resolution: {integrity: sha512-fOPQYbGSgH0HUp4UJO4sMBFjY6DuWq+2i8rixyUMb3CdGixs/gccURvYOAhajBdKDoGajFr3mUq5rH3phtkGzw==}
297 +
    engines: {node: '>=6.9.0'}
298 +
    peerDependencies:
299 +
      '@babel/core': ^7.0.0-0
300 +
301 +
  '@babel/plugin-transform-react-jsx-source@7.24.7':
302 +
    resolution: {integrity: sha512-J2z+MWzZHVOemyLweMqngXrgGC42jQ//R0KdxqkIz/OrbVIIlhFI3WigZ5fO+nwFvBlncr4MGapd8vTyc7RPNQ==}
261 303
    engines: {node: '>=6.9.0'}
262 304
    peerDependencies:
263 305
      '@babel/core': ^7.0.0-0
926 968
  '@shikijs/vscode-textmate@9.2.2':
927 969
    resolution: {integrity: sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==}
928 970
971 +
  '@supabase/auth-js@2.65.0':
972 +
    resolution: {integrity: sha512-+wboHfZufAE2Y612OsKeVP4rVOeGZzzMLD/Ac3HrTQkkY4qXNjI6Af9gtmxwccE5nFvTiF114FEbIQ1hRq5uUw==}
973 +
974 +
  '@supabase/functions-js@2.4.1':
975 +
    resolution: {integrity: sha512-8sZ2ibwHlf+WkHDUZJUXqqmPvWQ3UHN0W30behOJngVh/qHHekhJLCFbh0AjkE9/FqqXtf9eoVvmYgfCLk5tNA==}
976 +
977 +
  '@supabase/node-fetch@2.6.15':
978 +
    resolution: {integrity: sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ==}
979 +
    engines: {node: 4.x || >=6.0.0}
980 +
981 +
  '@supabase/postgrest-js@1.16.1':
982 +
    resolution: {integrity: sha512-EOSEZFm5pPuCPGCmLF1VOCS78DfkSz600PBuvBND/IZmMciJ1pmsS3ss6TkB6UkuvTybYiBh7gKOYyxoEO3USA==}
983 +
984 +
  '@supabase/realtime-js@2.10.2':
985 +
    resolution: {integrity: sha512-qyCQaNg90HmJstsvr2aJNxK2zgoKh9ZZA8oqb7UT2LCh3mj9zpa3Iwu167AuyNxsxrUE8eEJ2yH6wLCij4EApA==}
986 +
987 +
  '@supabase/ssr@0.5.1':
988 +
    resolution: {integrity: sha512-+G94H/GZG0nErZ3FQV9yJmsC5Rj7dmcfCAwOt37hxeR1La+QTl8cE9whzYwPUrTJjMLGNXoO+1BMvVxwBAbz4g==}
989 +
    peerDependencies:
990 +
      '@supabase/supabase-js': ^2.43.4
991 +
992 +
  '@supabase/storage-js@2.7.0':
993 +
    resolution: {integrity: sha512-iZenEdO6Mx9iTR6T7wC7sk6KKsoDPLq8rdu5VRy7+JiT1i8fnqfcOr6mfF2Eaqky9VQzhP8zZKQYjzozB65Rig==}
994 +
995 +
  '@supabase/supabase-js@2.45.4':
996 +
    resolution: {integrity: sha512-E5p8/zOLaQ3a462MZnmnz03CrduA5ySH9hZyL03Y+QZLIOO4/Gs8Rdy4ZCKDHsN7x0xdanVEWWFN3pJFQr9/hg==}
997 +
929 998
  '@tailwindcss/aspect-ratio@0.4.2':
930 999
    resolution: {integrity: sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==}
931 1000
    peerDependencies:
1010 1079
  '@types/parse-json@4.0.2':
1011 1080
    resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
1012 1081
1082 +
  '@types/phoenix@1.6.5':
1083 +
    resolution: {integrity: sha512-xegpDuR+z0UqG9fwHqNoy3rI7JDlvaPh2TY47Fl80oq6g+hXT+c/LEuE43X48clZ6lOfANl5WrPur9fYO1RJ/w==}
1084 +
1013 1085
  '@types/prettier@2.7.3':
1014 1086
    resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==}
1015 1087
1088 +
  '@types/prop-types@15.7.13':
1089 +
    resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==}
1090 +
1091 +
  '@types/react-dom@18.3.0':
1092 +
    resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==}
1093 +
1094 +
  '@types/react@18.3.8':
1095 +
    resolution: {integrity: sha512-syBUrW3/XpnW4WJ41Pft+I+aPoDVbrBVQGEnbD7NijDGlVC+8gV/XKRY+7vMDlfPpbwYt0l1vd/Sj8bJGMbs9Q==}
1096 +
1016 1097
  '@types/sax@1.2.7':
1017 1098
    resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==}
1018 1099
1027 1108
1028 1109
  '@types/unist@3.0.3':
1029 1110
    resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
1111 +
1112 +
  '@types/ws@8.5.12':
1113 +
    resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==}
1030 1114
1031 1115
  '@typescript-eslint/eslint-plugin@5.62.0':
1032 1116
    resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==}
1093 1177
    resolution: {integrity: sha512-mj5CPR02y0BRs1tN3oZcBNAX9a8NxsIUl9vElDPcqxnMfP0RbRc9fI9Ud7+QDg/1Izvt5uMumsr+6YsmVHcyuw==}
1094 1178
    peerDependencies:
1095 1179
      react: ^16.8||^17||^18
1180 +
1181 +
  '@vitejs/plugin-react@4.3.1':
1182 +
    resolution: {integrity: sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg==}
1183 +
    engines: {node: ^14.18.0 || >=16.0.0}
1184 +
    peerDependencies:
1185 +
      vite: ^4.2.0 || ^5.0.0
1096 1186
1097 1187
  '@volar/language-core@2.4.5':
1098 1188
    resolution: {integrity: sha512-F4tA0DCO5Q1F5mScHmca0umsi2ufKULAnMOVBfMsZdT4myhVl4WdKRwCaKcfOkIEuyrAVvtq1ESBdZ+rSyLVww==}
1449 1539
    resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==}
1450 1540
    engines: {node: '>=4'}
1451 1541
    hasBin: true
1542 +
1543 +
  csstype@3.1.3:
1544 +
    resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
1452 1545
1453 1546
  damerau-levenshtein@1.0.8:
1454 1547
    resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==}
3093 3186
    resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==}
3094 3187
    engines: {node: '>=8'}
3095 3188
3189 +
  react-dom@18.3.1:
3190 +
    resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
3191 +
    peerDependencies:
3192 +
      react: ^18.3.1
3193 +
3194 +
  react-refresh@0.14.2:
3195 +
    resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==}
3196 +
    engines: {node: '>=0.10.0'}
3197 +
3096 3198
  react@18.3.1:
3097 3199
    resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
3098 3200
    engines: {node: '>=0.10.0'}
3244 3346
3245 3347
  sax@1.4.1:
3246 3348
    resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
3349 +
3350 +
  scheduler@0.23.2:
3351 +
    resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
3247 3352
3248 3353
  section-matter@1.0.0:
3249 3354
    resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==}
3533 3638
    resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
3534 3639
    engines: {node: '>=8.0'}
3535 3640
3641 +
  tr46@0.0.3:
3642 +
    resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
3643 +
3536 3644
  trim-lines@3.0.1:
3537 3645
    resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
3538 3646
3618 3726
3619 3727
  ufo@1.5.4:
3620 3728
    resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==}
3729 +
3730 +
  ultrahtml@1.5.3:
3731 +
    resolution: {integrity: sha512-GykOvZwgDWZlTQMtp5jrD4BVL+gNn2NVlVafjcFUJ7taY20tqYdwdoWBFy6GBJsNTZe1GkGPkSl5knQAjtgceg==}
3621 3732
3622 3733
  unbox-primitive@1.0.2:
3623 3734
    resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
3739 3850
3740 3851
  web-namespaces@2.0.1:
3741 3852
    resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==}
3853 +
3854 +
  webidl-conversions@3.0.1:
3855 +
    resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
3856 +
3857 +
  whatwg-url@5.0.0:
3858 +
    resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
3742 3859
3743 3860
  which-boxed-primitive@1.0.2:
3744 3861
    resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==}
3961 4078
    dependencies:
3962 4079
      prismjs: 1.29.0
3963 4080
4081 +
  '@astrojs/react@3.6.2(@types/react-dom@18.3.0)(@types/react@18.3.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vite@5.4.6(@types/node@22.5.5))':
4082 +
    dependencies:
4083 +
      '@types/react': 18.3.8
4084 +
      '@types/react-dom': 18.3.0
4085 +
      '@vitejs/plugin-react': 4.3.1(vite@5.4.6(@types/node@22.5.5))
4086 +
      react: 18.3.1
4087 +
      react-dom: 18.3.1(react@18.3.1)
4088 +
      ultrahtml: 1.5.3
4089 +
    transitivePeerDependencies:
4090 +
      - supports-color
4091 +
      - vite
4092 +
3964 4093
  '@astrojs/rss@4.0.7':
3965 4094
    dependencies:
3966 4095
      fast-xml-parser: 4.5.0
4105 4234
      '@babel/types': 7.25.6
4106 4235
4107 4236
  '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)':
4237 +
    dependencies:
4238 +
      '@babel/core': 7.25.2
4239 +
      '@babel/helper-plugin-utils': 7.24.8
4240 +
4241 +
  '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.25.2)':
4242 +
    dependencies:
4243 +
      '@babel/core': 7.25.2
4244 +
      '@babel/helper-plugin-utils': 7.24.8
4245 +
4246 +
  '@babel/plugin-transform-react-jsx-source@7.24.7(@babel/core@7.25.2)':
4108 4247
    dependencies:
4109 4248
      '@babel/core': 7.25.2
4110 4249
      '@babel/helper-plugin-utils': 7.24.8
4615 4754
4616 4755
  '@shikijs/vscode-textmate@9.2.2': {}
4617 4756
4757 +
  '@supabase/auth-js@2.65.0':
4758 +
    dependencies:
4759 +
      '@supabase/node-fetch': 2.6.15
4760 +
4761 +
  '@supabase/functions-js@2.4.1':
4762 +
    dependencies:
4763 +
      '@supabase/node-fetch': 2.6.15
4764 +
4765 +
  '@supabase/node-fetch@2.6.15':
4766 +
    dependencies:
4767 +
      whatwg-url: 5.0.0
4768 +
4769 +
  '@supabase/postgrest-js@1.16.1':
4770 +
    dependencies:
4771 +
      '@supabase/node-fetch': 2.6.15
4772 +
4773 +
  '@supabase/realtime-js@2.10.2':
4774 +
    dependencies:
4775 +
      '@supabase/node-fetch': 2.6.15
4776 +
      '@types/phoenix': 1.6.5
4777 +
      '@types/ws': 8.5.12
4778 +
      ws: 8.18.0
4779 +
    transitivePeerDependencies:
4780 +
      - bufferutil
4781 +
      - utf-8-validate
4782 +
4783 +
  '@supabase/ssr@0.5.1(@supabase/supabase-js@2.45.4)':
4784 +
    dependencies:
4785 +
      '@supabase/supabase-js': 2.45.4
4786 +
      cookie: 0.6.0
4787 +
4788 +
  '@supabase/storage-js@2.7.0':
4789 +
    dependencies:
4790 +
      '@supabase/node-fetch': 2.6.15
4791 +
4792 +
  '@supabase/supabase-js@2.45.4':
4793 +
    dependencies:
4794 +
      '@supabase/auth-js': 2.65.0
4795 +
      '@supabase/functions-js': 2.4.1
4796 +
      '@supabase/node-fetch': 2.6.15
4797 +
      '@supabase/postgrest-js': 1.16.1
4798 +
      '@supabase/realtime-js': 2.10.2
4799 +
      '@supabase/storage-js': 2.7.0
4800 +
    transitivePeerDependencies:
4801 +
      - bufferutil
4802 +
      - utf-8-validate
4803 +
4618 4804
  '@tailwindcss/aspect-ratio@0.4.2(tailwindcss@3.4.12)':
4619 4805
    dependencies:
4620 4806
      tailwindcss: 3.4.12
4709 4895
4710 4896
  '@types/parse-json@4.0.2': {}
4711 4897
4898 +
  '@types/phoenix@1.6.5': {}
4899 +
4712 4900
  '@types/prettier@2.7.3': {}
4713 4901
4902 +
  '@types/prop-types@15.7.13': {}
4903 +
4904 +
  '@types/react-dom@18.3.0':
4905 +
    dependencies:
4906 +
      '@types/react': 18.3.8
4907 +
4908 +
  '@types/react@18.3.8':
4909 +
    dependencies:
4910 +
      '@types/prop-types': 15.7.13
4911 +
      csstype: 3.1.3
4912 +
4714 4913
  '@types/sax@1.2.7':
4715 4914
    dependencies:
4716 4915
      '@types/node': 17.0.45
4724 4923
  '@types/unist@2.0.11': {}
4725 4924
4726 4925
  '@types/unist@3.0.3': {}
4926 +
4927 +
  '@types/ws@8.5.12':
4928 +
    dependencies:
4929 +
      '@types/node': 22.5.5
4727 4930
4728 4931
  '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)':
4729 4932
    dependencies:
4814 5017
  '@vercel/analytics@0.1.11(react@18.3.1)':
4815 5018
    dependencies:
4816 5019
      react: 18.3.1
5020 +
5021 +
  '@vitejs/plugin-react@4.3.1(vite@5.4.6(@types/node@22.5.5))':
5022 +
    dependencies:
5023 +
      '@babel/core': 7.25.2
5024 +
      '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2)
5025 +
      '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2)
5026 +
      '@types/babel__core': 7.20.5
5027 +
      react-refresh: 0.14.2
5028 +
      vite: 5.4.6(@types/node@22.5.5)
5029 +
    transitivePeerDependencies:
5030 +
      - supports-color
4817 5031
4818 5032
  '@volar/language-core@2.4.5':
4819 5033
    dependencies:
5262 5476
  css-functions-list@3.2.2: {}
5263 5477
5264 5478
  cssesc@3.0.0: {}
5479 +
5480 +
  csstype@3.1.3: {}
5265 5481
5266 5482
  damerau-levenshtein@1.0.8: {}
5267 5483
7358 7574
7359 7575
  quick-lru@4.0.1: {}
7360 7576
7577 +
  react-dom@18.3.1(react@18.3.1):
7578 +
    dependencies:
7579 +
      loose-envify: 1.4.0
7580 +
      react: 18.3.1
7581 +
      scheduler: 0.23.2
7582 +
7583 +
  react-refresh@0.14.2: {}
7584 +
7361 7585
  react@18.3.1:
7362 7586
    dependencies:
7363 7587
      loose-envify: 1.4.0
7600 7824
      suf-log: 2.5.3
7601 7825
7602 7826
  sax@1.4.1: {}
7827 +
7828 +
  scheduler@0.23.2:
7829 +
    dependencies:
7830 +
      loose-envify: 1.4.0
7603 7831
7604 7832
  section-matter@1.0.0:
7605 7833
    dependencies:
7983 8211
    dependencies:
7984 8212
      is-number: 7.0.0
7985 8213
8214 +
  tr46@0.0.3: {}
8215 +
7986 8216
  trim-lines@3.0.1: {}
7987 8217
7988 8218
  trim-newlines@3.0.1: {}
8060 8290
  typescript@5.6.2: {}
8061 8291
8062 8292
  ufo@1.5.4: {}
8293 +
8294 +
  ultrahtml@1.5.3: {}
8063 8295
8064 8296
  unbox-primitive@1.0.2:
8065 8297
    dependencies:
8189 8421
  vscode-uri@3.0.8: {}
8190 8422
8191 8423
  web-namespaces@2.0.1: {}
8424 +
8425 +
  webidl-conversions@3.0.1: {}
8426 +
8427 +
  whatwg-url@5.0.0:
8428 +
    dependencies:
8429 +
      tr46: 0.0.3
8430 +
      webidl-conversions: 3.0.1
8192 8431
8193 8432
  which-boxed-primitive@1.0.2:
8194 8433
    dependencies:
src/components/SignInButton.tsx (added) +18 −0
1 +
import { supabase } from "src/lib/supabase";
2 +
3 +
export function SignInButton() {
4 +
	async function signInWithGithub() {
5 +
		await supabase.auth.signInWithOAuth({
6 +
			provider: "github",
7 +
			options: {
8 +
				redirectTo: "https://stevedylan.dev/auth/callback",
9 +
			},
10 +
		});
11 +
	}
12 +
13 +
	return (
14 +
		<button type="button" onClick={signInWithGithub}>
15 +
			Sign In
16 +
		</button>
17 +
	);
18 +
}
src/env.d.ts +10 −0
1 1
/// <reference path="../.astro/types.d.ts" />
2 +
// <reference path="../.astro/types.d.ts" />
2 3
/// <reference types="@astrojs/image/client" />
4 +
5 +
interface ImportMetaEnv {
6 +
	readonly PUBLIC_SUPABASE_URL: string;
7 +
	readonly PUBLIC_SUPABASE_ANON_KEY: string;
8 +
}
9 +
10 +
interface ImportMeta {
11 +
	readonly env: ImportMetaEnv;
12 +
}
src/lib/supabase.ts (added) +6 −0
1 +
import { createClient } from "@supabase/supabase-js";
2 +
3 +
export const supabase = createClient(
4 +
	import.meta.env.PUBLIC_SUPABASE_URL,
5 +
	import.meta.env.PUBLIC_SUPABASE_ANON_KEY,
6 +
);
src/pages/auth/callback.ts (added) +36 −0
1 +
import { createServerClient, parseCookieHeader } from "@supabase/ssr";
2 +
import type { APIRoute } from "astro";
3 +
4 +
export const GET: APIRoute = async ({ request, cookies, redirect }) => {
5 +
	const requestUrl = new URL(request.url);
6 +
	const code = requestUrl.searchParams.get("code");
7 +
	const next = requestUrl.searchParams.get("next") || "/";
8 +
9 +
	if (code) {
10 +
		const supabase = createServerClient(
11 +
			import.meta.env.PUBLIC_SUPABASE_URL,
12 +
			import.meta.env.PUBLIC_SUPABASE_ANON_KEY,
13 +
			{
14 +
				cookies: {
15 +
					getAll() {
16 +
						return parseCookieHeader(Astro.request.headers.get("Cookie") ?? "");
17 +
					},
18 +
					setAll(cookiesToSet) {
19 +
						cookiesToSet.forEach(({ name, value, options }) =>
20 +
							Astro.cookies.set(name, value, options),
21 +
						);
22 +
					},
23 +
				},
24 +
			},
25 +
		);
26 +
27 +
		const { error } = await supabase.auth.exchangeCodeForSession(code);
28 +
29 +
		if (!error) {
30 +
			return redirect(next);
31 +
		}
32 +
	}
33 +
34 +
	// return the user to an error page with instructions
35 +
	return redirect("/auth/auth-code-error");
36 +
};
src/pages/log.astro (added) +15 −0
1 +
---
2 +
import PageLayout from "@/layouts/Base";
3 +
import { SignInButton } from "src/components/SignInButton";
4 +
5 +
const meta = {
6 +
	title: "Log",
7 +
	description: "Public Log",
8 +
};
9 +
---
10 +
11 +
<PageLayout meta={meta}>
12 +
	<div class="space-y-6">
13 +
  	<SignInButton client:load />
14 +
	</div>
15 +
</PageLayout>
tsconfig.json +38 −19
1 1
{
2 -
	"extends": "astro/tsconfigs/base",
3 -
	"compilerOptions": {
4 -
		"baseUrl": ".",
5 -
		"paths": {
6 -
			"@/components/*": ["src/components/*.astro"],
7 -
			"@/layouts/*": ["src/layouts/*.astro"],
8 -
			"@/utils": ["src/utils/index.ts"],
9 -
			"@/stores/*": ["src/stores/*"],
10 -
			"@/data/*": ["src/data/*"],
11 -
			"@/site-config": ["src/site.config.ts"]
12 -
		},
13 -
		"plugins": [
14 -
			{
15 -
				"name": "@astrojs/ts-plugin"
16 -
			}
17 -
		]
18 -
	},
19 -
	"exclude": ["node_modules", "**/node_modules/*", ".vscode", "dist"]
20 -
}
2 +
  "extends": "astro/tsconfigs/base",
3 +
  "compilerOptions": {
4 +
    "baseUrl": ".",
5 +
    "paths": {
6 +
      "@/components/*": [
7 +
        "src/components/*.astro"
8 +
      ],
9 +
      "@/layouts/*": [
10 +
        "src/layouts/*.astro"
11 +
      ],
12 +
      "@/utils": [
13 +
        "src/utils/index.ts"
14 +
      ],
15 +
      "@/stores/*": [
16 +
        "src/stores/*"
17 +
      ],
18 +
      "@/data/*": [
19 +
        "src/data/*"
20 +
      ],
21 +
      "@/site-config": [
22 +
        "src/site.config.ts"
23 +
      ]
24 +
    },
25 +
    "plugins": [
26 +
      {
27 +
        "name": "@astrojs/ts-plugin"
28 +
      }
29 +
    ],
30 +
    "jsx": "react-jsx",
31 +
    "jsxImportSource": "react"
32 +
  },
33 +
  "exclude": [
34 +
    "node_modules",
35 +
    "**/node_modules/*",
36 +
    ".vscode",
37 +
    "dist"
38 +
  ]
39 +
}