File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { defineNuxtModule , useNuxt , addTemplate } from 'nuxt/kit'
1+ import { defineNuxtModule , useNuxt , addServerTemplate } from 'nuxt/kit'
22import { join } from 'node:path'
33import { appendFileSync , existsSync , readFileSync } from 'node:fs'
44import { randomUUID } from 'node:crypto'
@@ -24,14 +24,11 @@ export default defineNuxtModule({
2424 }
2525
2626 // bake it into a virtual file
27- const template = addTemplate ( {
28- filename : 'oauth- config.mjs ' ,
27+ addServerTemplate ( {
28+ filename : '# oauth/ config' ,
2929 getContents : ( ) => `export const clientUri = ${ JSON . stringify ( clientUri ) } ;` ,
30- write : true ,
3130 } )
3231
33- nuxt . options . alias [ '#oauth/config' ] = template . dst
34-
3532 if ( nuxt . options . _prepare || process . env . NUXT_SESSION_PASSWORD ) {
3633 return
3734 }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { getOAuthLock } from '#server/utils/atproto/lock'
66import { useOAuthStorage } from '#server/utils/atproto/storage'
77import { UNSET_NUXT_SESSION_PASSWORD } from '#shared/utils/constants'
88import { OAuthMetadataSchema } from '#shared/schemas/oauth'
9- // @ts -ignore: virtual file from oauth module
9+ // @ts -expect-error virtual file from oauth module
1010import { clientUri } from '#oauth/config'
1111// TODO: limit scope as features gets added. atproto just allows login so no scary login screen till we have scopes
1212export const scope = 'atproto'
You can’t perform that action at this time.
0 commit comments