@dargmuesli/nuxt-vio 20.6.5 → 20.6.7
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 +1 -1
- package/package.json +5 -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
|
@@ -133,7 +133,7 @@ export default defineNuxtConfig(
|
|
|
133
133
|
},
|
|
134
134
|
vite: {
|
|
135
135
|
plugins: [
|
|
136
|
-
tailwindcss(),
|
|
136
|
+
tailwindcss() as never, // TODO: remove typecast once tailwindcss fixes the plugin type
|
|
137
137
|
{
|
|
138
138
|
// This plugin suppresses false-positive sourcemap warnings from Tailwind's Vite plugin
|
|
139
139
|
// TODO: remove once tailwind generates sourcemaps for their transforms (https://github.com/tailwindlabs/tailwindcss/discussions/16119)
|
package/package.json
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"defu": "6.1.4",
|
|
56
56
|
"h3": "1.15.5",
|
|
57
57
|
"lodash-es": "4.17.23",
|
|
58
|
-
"nuxt": "
|
|
58
|
+
"nuxt": "4.3.1",
|
|
59
59
|
"pinia": "3.0.4",
|
|
60
60
|
"prettier": "3.8.1",
|
|
61
61
|
"prettier-plugin-tailwindcss": "0.7.2",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
".config",
|
|
77
77
|
"app",
|
|
78
78
|
"i18n",
|
|
79
|
+
"node",
|
|
79
80
|
"server",
|
|
80
81
|
"shared",
|
|
81
|
-
"node",
|
|
82
82
|
"nuxt.config.ts",
|
|
83
83
|
"package.json"
|
|
84
84
|
],
|
|
@@ -113,9 +113,9 @@
|
|
|
113
113
|
"preview": "nuxt preview playground",
|
|
114
114
|
"start": "pnpm run start:node",
|
|
115
115
|
"start:dev": "pnpm run certificates && NODE_EXTRA_CA_CERTS=\"$(mkcert -CAROOT)/rootCA.pem\" nuxt dev playground",
|
|
116
|
-
"start:node": "node
|
|
117
|
-
"start:static": "node
|
|
116
|
+
"start:node": "node node/server/node.mjs",
|
|
117
|
+
"start:static": "node node/server/static.mjs"
|
|
118
118
|
},
|
|
119
119
|
"type": "module",
|
|
120
|
-
"version": "20.6.
|
|
120
|
+
"version": "20.6.7"
|
|
121
121
|
}
|