Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.10.0
v18
6 changes: 3 additions & 3 deletions apps/discord-bot-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"prepare": "svelte-kit sync"
},
"dependencies": {
"@auth/core": "^0.28.1",
"@auth/sveltekit": "^0.3.6",
"@auth/core": "^0.37.0",
"@auth/sveltekit": "^1.7.0",
"@aws-crypto/sha256-js": "^2.0.1",
"@carbon/styles": "^1.48.1",
"@discordjs/builders": "^1.1.0",
Expand All @@ -45,7 +45,7 @@
"@aws-amplify/discord-bot-tsconfig": "workspace:*",
"@carbon/charts": "^1.5.2",
"@carbon/charts-svelte": "^1.13.25",
"@playwright/test": "^1.37.1",
"@playwright/test": "^1.49.0",
"@sveltejs/adapter-node": "^4.0.1",
"@sveltejs/kit": "^2.5.0",
"@sveltejs/vite-plugin-svelte": "^3.0.2",
Expand Down
3 changes: 3 additions & 0 deletions apps/discord-bot-frontend/src/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface AppSession extends Auth.Session {
declare global {
namespace App {
interface Locals {
auth: () => Promise<AppSession | null>
session?: AppSession
// Guild ID of the guild the user is currently viewing
guildId: string
Expand All @@ -35,3 +36,5 @@ declare global {
interface Stuff {}
}
}

export type { User, AppSession }
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ import { config } from '$lib/auth/config'
* @todo use session callback to extend session?
* @todo port in changes to apply roles in discord based on GitHub org membership (if integration is enabled)
*/
export const handleAuth = SvelteKitAuth(config) satisfies Handle
const { handle } = SvelteKitAuth(config)
export const handleAuth = handle satisfies Handle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Handle } from '@sveltejs/kit'
* Hook to set session on event.locals
*/
export const handleSetSessionLocals: Handle = async ({ event, resolve }) => {
const session = await event.locals.getSession()
const session = await event.locals.auth()
if (session) {
event.locals.session = session
}
Expand Down
2 changes: 1 addition & 1 deletion apps/discord-bot-frontend/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const config = {
'connect-src': ['self', 'https://discord.com'],
'img-src': ['self', 'data:', 'https://cdn.discordapp.com'],
'script-src': ['self'],
'style-src': ['self', 'unsafe-inline'],
'style-src': ['self'],
// https://1.www.s81c.com/ is for Carbon fonts
'font-src': ['self', 'https://1.www.s81c.com/', 'data:'],
},
Expand Down
144 changes: 83 additions & 61 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading