@dargmuesli/nuxt-vio 21.0.0-beta.4 → 21.0.0-beta.6
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/node/server/node.mjs +16 -0
- package/node/server/static.mjs +26 -0
- package/nuxt.config.ts +4 -6
- package/package.json +27 -27
- package/shared/utils/constants.ts +1 -0
- package/shared/utils/utils.ts +0 -5
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
|
|
4
|
+
const root = process.argv[2] || process.cwd()
|
|
5
|
+
|
|
6
|
+
const certSuffix = process.env.CI ? '-ci' : '-dev'
|
|
7
|
+
const certPath = path.join(root, `.config/certificates/ssl${certSuffix}.crt`)
|
|
8
|
+
const keyPath = path.join(root, `.config/certificates/ssl${certSuffix}.key`)
|
|
9
|
+
|
|
10
|
+
console.log('Using SSL certificate:', certPath)
|
|
11
|
+
|
|
12
|
+
process.env.NITRO_SSL_CERT = fs.readFileSync(certPath, 'utf8')
|
|
13
|
+
process.env.NITRO_SSL_KEY = fs.readFileSync(keyPath, 'utf8')
|
|
14
|
+
|
|
15
|
+
// await import(path.join(root, '.output/server/sentry.server.config.mjs'))
|
|
16
|
+
await import(path.join(root, 'playground/.output/server/index.mjs'))
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
|
|
4
|
+
const root = process.argv[2] || process.cwd()
|
|
5
|
+
|
|
6
|
+
const certSuffix = process.env.CI ? '-ci' : '-dev'
|
|
7
|
+
const certPath = path.join(root, `.config/certificates/ssl${certSuffix}.crt`)
|
|
8
|
+
const keyPath = path.join(root, `.config/certificates/ssl${certSuffix}.key`)
|
|
9
|
+
|
|
10
|
+
const serveProcess = spawn(
|
|
11
|
+
'serve',
|
|
12
|
+
['playground/.output/public', '--ssl-cert', certPath, '--ssl-key', keyPath],
|
|
13
|
+
{
|
|
14
|
+
stdio: 'inherit',
|
|
15
|
+
cwd: root,
|
|
16
|
+
},
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
serveProcess.on('error', (error) => {
|
|
20
|
+
console.error('Failed to start serve:', error)
|
|
21
|
+
process.exit(1)
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
serveProcess.on('exit', (code) => {
|
|
25
|
+
process.exit(code || 0)
|
|
26
|
+
})
|
package/nuxt.config.ts
CHANGED
|
@@ -95,6 +95,7 @@ export default defineNuxtConfig(
|
|
|
95
95
|
compressPublicAssets: true,
|
|
96
96
|
experimental: {
|
|
97
97
|
asyncContext: true,
|
|
98
|
+
typedPages: true,
|
|
98
99
|
},
|
|
99
100
|
},
|
|
100
101
|
runtimeConfig: {
|
|
@@ -103,7 +104,7 @@ export default defineNuxtConfig(
|
|
|
103
104
|
baseUrl: SITE_URL,
|
|
104
105
|
},
|
|
105
106
|
site: {
|
|
106
|
-
url: SITE_URL,
|
|
107
|
+
url: SITE_URL, // TODO: evaluate removal for static builds in favor of i18n.baseUrl
|
|
107
108
|
},
|
|
108
109
|
vio: {
|
|
109
110
|
isTesting: false,
|
|
@@ -139,7 +140,7 @@ export default defineNuxtConfig(
|
|
|
139
140
|
},
|
|
140
141
|
vite: {
|
|
141
142
|
plugins: [
|
|
142
|
-
tailwindcss(),
|
|
143
|
+
tailwindcss() as never, // TODO: remove typecast once tailwindcss fixes the plugin type
|
|
143
144
|
{
|
|
144
145
|
// This plugin suppresses false-positive sourcemap warnings from Tailwind's Vite plugin
|
|
145
146
|
// TODO: remove once tailwind generates sourcemaps for their transforms (https://github.com/tailwindlabs/tailwindcss/discussions/16119)
|
|
@@ -279,7 +280,7 @@ export default defineNuxtConfig(
|
|
|
279
280
|
'style-src': false as const,
|
|
280
281
|
'style-src-attr': false as const,
|
|
281
282
|
'style-src-elem': false as const,
|
|
282
|
-
'upgrade-insecure-requests': false,
|
|
283
|
+
'upgrade-insecure-requests': false,
|
|
283
284
|
'worker-src': false as const,
|
|
284
285
|
},
|
|
285
286
|
xXSSProtection: '1; mode=block', // TODO: set back to `0` once CSP does not use `unsafe-*` anymore (https://github.com/maevsi/maevsi/issues/1047)
|
|
@@ -293,9 +294,6 @@ export default defineNuxtConfig(
|
|
|
293
294
|
prefix: '',
|
|
294
295
|
componentDir: resolve('./app/components/scn'),
|
|
295
296
|
},
|
|
296
|
-
site: {
|
|
297
|
-
url: SITE_URL,
|
|
298
|
-
},
|
|
299
297
|
sitemap: {
|
|
300
298
|
credits: false,
|
|
301
299
|
zeroRuntime: true,
|
package/package.json
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@dargmuesli/nuxt-cookie-control": "9.1.
|
|
3
|
+
"@dargmuesli/nuxt-cookie-control": "9.1.17",
|
|
4
4
|
"@eslint/compat": "2.0.2",
|
|
5
5
|
"@heroicons/vue": "2.2.0",
|
|
6
|
-
"@nuxtjs/turnstile": "1.1.1",
|
|
7
6
|
"@http-util/status-i18n": "0.9.0",
|
|
8
|
-
"@intlify/eslint-plugin-vue-i18n": "4.
|
|
9
|
-
"@nuxt/devtools": "3.
|
|
10
|
-
"@nuxt/eslint": "1.
|
|
7
|
+
"@intlify/eslint-plugin-vue-i18n": "4.2.0",
|
|
8
|
+
"@nuxt/devtools": "3.2.2",
|
|
9
|
+
"@nuxt/eslint": "1.15.2",
|
|
11
10
|
"@nuxt/image": "2.0.0",
|
|
12
11
|
"@nuxtjs/color-mode": "4.0.0",
|
|
13
12
|
"@nuxtjs/html-validator": "2.1.0",
|
|
14
13
|
"@nuxtjs/i18n": "10.2.3",
|
|
15
14
|
"@nuxtjs/seo": "3.4.0",
|
|
15
|
+
"@nuxtjs/turnstile": "1.1.1",
|
|
16
16
|
"@pinia/nuxt": "0.11.3",
|
|
17
17
|
"@resvg/resvg-js": "2.6.2",
|
|
18
18
|
"@tailwindcss/forms": "0.5.11",
|
|
19
19
|
"@tailwindcss/typography": "0.5.19",
|
|
20
|
-
"@tailwindcss/vite": "4.1
|
|
20
|
+
"@tailwindcss/vite": "4.2.1",
|
|
21
21
|
"@types/lodash-es": "4.17.12",
|
|
22
|
-
"@types/nodemailer": "7.0.
|
|
22
|
+
"@types/nodemailer": "7.0.11",
|
|
23
23
|
"@urql/core": "6.0.1",
|
|
24
24
|
"@urql/vue": "2.0.0",
|
|
25
25
|
"@vuelidate/core": "2.0.3",
|
|
26
26
|
"@vuelidate/validators": "2.0.4",
|
|
27
|
-
"@vueuse/core": "14.2.
|
|
27
|
+
"@vueuse/core": "14.2.1",
|
|
28
28
|
"class-variance-authority": "0.7.1",
|
|
29
29
|
"clsx": "2.1.1",
|
|
30
|
-
"eslint": "
|
|
30
|
+
"eslint": "10.0.2",
|
|
31
31
|
"eslint-config-prettier": "10.1.8",
|
|
32
|
-
"eslint-plugin-compat": "
|
|
32
|
+
"eslint-plugin-compat": "7.0.0",
|
|
33
33
|
"eslint-plugin-prettier": "5.5.5",
|
|
34
|
-
"eslint-plugin-yml": "3.
|
|
34
|
+
"eslint-plugin-yml": "3.3.0",
|
|
35
35
|
"globals": "17.3.0",
|
|
36
36
|
"jiti": "2.6.1",
|
|
37
37
|
"jose": "6.1.3",
|
|
38
|
-
"lucide-vue-next": "0.
|
|
38
|
+
"lucide-vue-next": "0.575.0",
|
|
39
39
|
"nodemailer": "8.0.1",
|
|
40
40
|
"nuxt-gtag": "4.1.0",
|
|
41
41
|
"nuxt-security": "2.5.1",
|
|
42
|
-
"reka-ui": "2.8.
|
|
42
|
+
"reka-ui": "2.8.2",
|
|
43
43
|
"satori": "0.19.1",
|
|
44
44
|
"shadcn-nuxt": "2.4.3",
|
|
45
|
-
"tailwind-merge": "3.
|
|
45
|
+
"tailwind-merge": "3.5.0",
|
|
46
46
|
"tw-animate-css": "1.4.0",
|
|
47
47
|
"vue-sonner": "2.0.9",
|
|
48
|
-
"vue-tsc": "3.2.
|
|
48
|
+
"vue-tsc": "3.2.5"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@types/node": "24.10.
|
|
51
|
+
"@types/node": "24.10.14",
|
|
52
52
|
"@urql/devtools": "2.0.3",
|
|
53
53
|
"@urql/exchange-graphcache": "9.0.0",
|
|
54
|
-
"@vueuse/core": "14.2.
|
|
54
|
+
"@vueuse/core": "14.2.1",
|
|
55
55
|
"consola": "3.4.2",
|
|
56
56
|
"defu": "6.1.4",
|
|
57
57
|
"h3": "1.15.5",
|
|
58
58
|
"lodash-es": "4.17.23",
|
|
59
|
-
"nuxt": "
|
|
59
|
+
"nuxt": "4.3.1",
|
|
60
60
|
"pinia": "3.0.4",
|
|
61
61
|
"prettier": "3.8.1",
|
|
62
62
|
"prettier-plugin-tailwindcss": "0.7.2",
|
|
63
63
|
"serve": "14.2.5",
|
|
64
64
|
"sharp": "0.34.5",
|
|
65
|
-
"stylelint": "17.
|
|
65
|
+
"stylelint": "17.4.0",
|
|
66
66
|
"stylelint-config-recommended-vue": "1.6.1",
|
|
67
67
|
"stylelint-config-standard": "40.0.0",
|
|
68
68
|
"stylelint-no-unsupported-browser-features": "8.1.1",
|
|
69
|
-
"tailwindcss": "4.1
|
|
70
|
-
"vue": "3.5.
|
|
71
|
-
"vue-router": "
|
|
69
|
+
"tailwindcss": "4.2.1",
|
|
70
|
+
"vue": "3.5.29",
|
|
71
|
+
"vue-router": "5.0.3"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": "24"
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
".config",
|
|
78
78
|
"app",
|
|
79
79
|
"i18n",
|
|
80
|
+
"node",
|
|
80
81
|
"server",
|
|
81
82
|
"shared",
|
|
82
|
-
"node",
|
|
83
83
|
"nuxt.config.ts",
|
|
84
84
|
"package.json"
|
|
85
85
|
],
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"nuxt": "^4.1.0",
|
|
90
90
|
"vue": "^3.5.21",
|
|
91
|
-
"vue-router": "^4.5.1"
|
|
91
|
+
"vue-router": "^4.5.1 || ^5.0.0"
|
|
92
92
|
},
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"access": "public"
|
|
@@ -115,9 +115,9 @@
|
|
|
115
115
|
"preview": "nuxt preview playground",
|
|
116
116
|
"start": "pnpm run start:node",
|
|
117
117
|
"start:dev": "pnpm run certificates && NODE_EXTRA_CA_CERTS=\"$(mkcert -CAROOT)/rootCA.pem\" nuxt dev playground",
|
|
118
|
-
"start:node": "node
|
|
119
|
-
"start:static": "node
|
|
118
|
+
"start:node": "node node/server/node.mjs",
|
|
119
|
+
"start:static": "node node/server/static.mjs"
|
|
120
120
|
},
|
|
121
121
|
"type": "module",
|
|
122
|
-
"version": "21.0.0-beta.
|
|
122
|
+
"version": "21.0.0-beta.6"
|
|
123
123
|
}
|
|
@@ -129,6 +129,7 @@ export const VIO_GET_CSP = ({ siteUrl }: { siteUrl: URL }) =>
|
|
|
129
129
|
"'unsafe-inline'", // TODO: replace with "'nonce-{{nonce}}'" once vue-sonner supports it
|
|
130
130
|
"'self'", // TODO: `${siteUrl}_nuxt/`, // bundle
|
|
131
131
|
], // TODO: use `style-src-elem` once Playwright WebKit supports it
|
|
132
|
+
'upgrade-insecure-requests': true,
|
|
132
133
|
},
|
|
133
134
|
)
|
|
134
135
|
export const GTAG_COOKIE_ID = 'ga'
|
package/shared/utils/utils.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import type { RouteLocationRaw } from 'vue-router'
|
|
2
|
-
|
|
3
|
-
export const append = (path: string, pathToAppend?: RouteLocationRaw) =>
|
|
4
|
-
path + (path.endsWith('/') ? '' : '/') + (pathToAppend ?? '')
|
|
5
|
-
|
|
6
1
|
export const arrayRemoveNulls = <T>(array?: T[]) =>
|
|
7
2
|
array?.flatMap((x: T) => (x ? [x] : [])) || []
|