@dargmuesli/nuxt-vio 20.4.0 → 20.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"jiti": "2.6.1",
|
|
36
36
|
"jose": "6.1.3",
|
|
37
37
|
"lucide-vue-next": "0.562.0",
|
|
38
|
+
"nodemailer": "7.0.13",
|
|
38
39
|
"nuxt-gtag": "4.1.0",
|
|
39
40
|
"nuxt-security": "2.5.1",
|
|
40
41
|
"reka-ui": "2.7.0",
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"vue-tsc": "3.2.2"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
49
|
+
"@types/nodemailer": "7.0.9",
|
|
48
50
|
"@types/node": "24.10.9",
|
|
49
51
|
"@urql/devtools": "2.0.3",
|
|
50
52
|
"@urql/exchange-graphcache": "9.0.0",
|
|
@@ -115,5 +117,5 @@
|
|
|
115
117
|
"start:static": "serve playground/.output/public --ssl-cert ./.config/certificates/ssl.crt --ssl-key ./.config/certificates/ssl.key"
|
|
116
118
|
},
|
|
117
119
|
"type": "module",
|
|
118
|
-
"version": "20.
|
|
120
|
+
"version": "20.5.0"
|
|
119
121
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createTransport, type Transporter } from 'nodemailer'
|
|
2
|
+
|
|
3
|
+
export default defineNitroPlugin((nitroApp) => {
|
|
4
|
+
const runtimeConfig = useRuntimeConfig()
|
|
5
|
+
|
|
6
|
+
if (!runtimeConfig.vio.email.nodemailer.transport) {
|
|
7
|
+
;(import.meta.dev ? console.warn : console.error)(
|
|
8
|
+
'The SMTP configuration secret is missing!',
|
|
9
|
+
)
|
|
10
|
+
return
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const transporter = createTransport(
|
|
14
|
+
runtimeConfig.vio.email.nodemailer.transport,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
nitroApp.hooks.hook('request', (event) => {
|
|
18
|
+
event.context.$email = {
|
|
19
|
+
nodemailer: {
|
|
20
|
+
transporter,
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
nitroApp.hooks.hookOnce('close', () => {
|
|
26
|
+
transporter.close()
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
declare module 'h3' {
|
|
31
|
+
interface H3EventContext {
|
|
32
|
+
$email?: {
|
|
33
|
+
nodemailer: {
|
|
34
|
+
transporter: Transporter
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './turnstile'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dependencies'
|
|
File without changes
|