vitrify 0.14.1 → 0.14.3
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/package.json +15 -15
- package/src/node/frameworks/vue/fastify-ssr-plugin.ts +0 -2
- package/src/node/frameworks/vue/server.ts +0 -2
- package/src/vite/vue/main.ts +2 -11
- package/src/vite/vue/ssr/app.ts +0 -4
- package/src/vite/vue/ssr/entry-client.ts +0 -2
- package/src/vite/vue/ssr/entry-server.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitrify",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Stefan van Herwijnen",
|
|
6
6
|
"description": "Vite as your Full Stack development tool",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@fastify/middie": "^8.3.0",
|
|
52
|
-
"@fastify/static": "^
|
|
53
|
-
"@vitejs/plugin-vue": "^5.0.
|
|
52
|
+
"@fastify/static": "^7.0.1",
|
|
53
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
54
54
|
"ajv": "^8.12.0",
|
|
55
55
|
"builtin-modules": "^3.3.0",
|
|
56
56
|
"cac": "^6.7.14",
|
|
@@ -58,19 +58,19 @@
|
|
|
58
58
|
"critters": "^0.0.20",
|
|
59
59
|
"cross-env": "^7.0.3",
|
|
60
60
|
"esbuild": "^0.20.0",
|
|
61
|
-
"fastify": "^4.
|
|
61
|
+
"fastify": "^4.26.1",
|
|
62
62
|
"glob": "^10.3.10",
|
|
63
|
-
"happy-dom": "^13.3.
|
|
63
|
+
"happy-dom": "^13.3.8",
|
|
64
64
|
"is-port-reachable": "^4.0.0",
|
|
65
|
-
"magic-string": "^0.30.
|
|
65
|
+
"magic-string": "^0.30.7",
|
|
66
66
|
"merge-deep": "^3.0.3",
|
|
67
67
|
"readline": "^1.3.0",
|
|
68
68
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
69
|
-
"sass": "1.
|
|
69
|
+
"sass": "1.71.0",
|
|
70
70
|
"ts-node": "^10.9.2",
|
|
71
71
|
"unplugin-vue-components": "^0.26.0",
|
|
72
|
-
"vite": "^5.
|
|
73
|
-
"vite-plugin-pwa": "^0.
|
|
72
|
+
"vite": "^5.1.3",
|
|
73
|
+
"vite-plugin-pwa": "^0.18.2",
|
|
74
74
|
"vitefu": "^0.2.5",
|
|
75
75
|
"vitest": "^1.2.2",
|
|
76
76
|
"workbox-window": "^7.0.0"
|
|
@@ -80,17 +80,17 @@
|
|
|
80
80
|
"@types/connect": "^3.4.38",
|
|
81
81
|
"@types/glob": "^8.1.0",
|
|
82
82
|
"@types/merge-deep": "^3.0.3",
|
|
83
|
-
"@types/node": "^20.11.
|
|
83
|
+
"@types/node": "^20.11.19",
|
|
84
84
|
"@types/ws": "^8.5.10",
|
|
85
|
-
"@vue/runtime-core": "^3.4.
|
|
86
|
-
"quasar": "^2.14.
|
|
87
|
-
"rollup": "^4.
|
|
85
|
+
"@vue/runtime-core": "^3.4.19",
|
|
86
|
+
"quasar": "^2.14.4",
|
|
87
|
+
"rollup": "^4.11.0",
|
|
88
88
|
"typescript": "^5.3.3",
|
|
89
|
-
"vue": "^3.4.
|
|
89
|
+
"vue": "^3.4.19",
|
|
90
90
|
"vue-router": "^4.2.5"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
|
-
"@fastify/static": "^
|
|
93
|
+
"@fastify/static": "^7.01",
|
|
94
94
|
"fastify": "^4.26.0",
|
|
95
95
|
"quasar": "^2.14.3",
|
|
96
96
|
"vue": "^3.4.15",
|
|
@@ -2,10 +2,8 @@ import type { FastifyPluginAsync, FastifyRequest, FastifyReply } from 'fastify'
|
|
|
2
2
|
import fastifyStatic from '@fastify/static'
|
|
3
3
|
import { readFileSync } from 'fs'
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
5
|
-
import { componentsModules, collectCss } from '../../helpers/collect-css-ssr.js'
|
|
6
5
|
import {
|
|
7
6
|
addOrReplaceAppDiv,
|
|
8
|
-
addOrReplaceTitle,
|
|
9
7
|
appendToBody,
|
|
10
8
|
appendToHead
|
|
11
9
|
} from '../../helpers/utils.js'
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { FastifyInstance } from 'fastify'
|
|
2
2
|
import fastify from 'fastify'
|
|
3
|
-
import type { ViteDevServer } from 'vite'
|
|
4
|
-
import { getCliDir, getCliViteDir } from '../../app-urls.js'
|
|
5
3
|
import type { OnRenderedHook, OnSetupFile } from '../../vitrify-config.js'
|
|
6
4
|
import type { FastifyCsrPlugin } from './fastify-csr-plugin.js'
|
|
7
5
|
import type { FastifySsrPlugin } from './fastify-ssr-plugin.js'
|
package/src/vite/vue/main.ts
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
// import 'vitrify.sass'
|
|
2
1
|
import createRouter from 'src/router'
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
createApp as createVueApp,
|
|
6
|
-
h,
|
|
7
|
-
onMounted as onMountedVue,
|
|
8
|
-
getCurrentInstance,
|
|
9
|
-
ref
|
|
10
|
-
} from 'vue'
|
|
11
|
-
import { onBoot, onMounted } from 'virtual:vitrify-hooks'
|
|
2
|
+
import { createSSRApp, createApp as createVueApp, ref } from 'vue'
|
|
3
|
+
import { onBoot } from 'virtual:vitrify-hooks'
|
|
12
4
|
import routes from 'src/router/routes'
|
|
13
5
|
import * as staticImports from 'virtual:static-imports'
|
|
14
|
-
import App from 'src/App.vue'
|
|
15
6
|
|
|
16
7
|
import RootComponent from './RootComponent.vue'
|
|
17
8
|
interface ssrContext {
|
package/src/vite/vue/ssr/app.ts
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
import { createApp } from '../../../node/frameworks/vue/server.js'
|
|
2
2
|
import { getAppDir } from '../../../node/app-urls.js'
|
|
3
|
-
// import { setup } from 'virtual:fastify-setup'
|
|
4
3
|
import { onSetup, onRendered } from 'virtual:vitrify-hooks'
|
|
5
4
|
import { fastifySsrPlugin } from './fastify-ssr-plugin.js'
|
|
6
5
|
import type { ViteDevServer } from 'vite'
|
|
7
6
|
|
|
8
|
-
// const appDir = getPkgJsonDir(import.meta.url)
|
|
9
7
|
const getString = (str?: string) => str
|
|
10
8
|
let baseUrl = getString(__BASE_URL__)
|
|
11
9
|
const appDir = getAppDir()
|
|
12
10
|
|
|
13
11
|
export const setupApp = async () => {
|
|
14
|
-
// const vitrifyDir = new URL('../', await resolve('vitrify', new URL(import.meta.url)))
|
|
15
12
|
return createApp({
|
|
16
13
|
onSetup,
|
|
17
14
|
appDir,
|
|
18
15
|
baseUrl,
|
|
19
16
|
fastifyPlugin: fastifySsrPlugin,
|
|
20
17
|
onRendered,
|
|
21
|
-
// vitrifyDir,
|
|
22
18
|
mode: import.meta.env.MODE
|
|
23
19
|
})
|
|
24
20
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { createApp } from '../main'
|
|
2
|
-
// import { renderToString } from 'vue/server-renderer'
|
|
3
|
-
|
|
4
|
-
// import { onRendered } from 'virtual:vitrify-hooks'
|
|
5
2
|
|
|
6
3
|
const initializeApp = async (url, ssrContext) => {
|
|
7
4
|
const onRenderedList = []
|
|
@@ -14,7 +11,6 @@ const initializeApp = async (url, ssrContext) => {
|
|
|
14
11
|
})
|
|
15
12
|
|
|
16
13
|
const { app, router, routes } = await createApp('server', ssrContext)
|
|
17
|
-
// set the router to the desired URL before rendering
|
|
18
14
|
|
|
19
15
|
router.push({ path: url })
|
|
20
16
|
ssrContext.initialState = {}
|