vitrify 0.26.7 → 0.26.8

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/dist/bin/dev.js CHANGED
@@ -103,9 +103,7 @@ ssr, framework = 'vue', host, appDir, publicDir, vite }) {
103
103
  setup,
104
104
  hooks: { onTemplateRendered, onAppRendered },
105
105
  vitrifyConfig
106
- } =
107
- // @ts-expect-error missing types
108
- await environment.runner.import(entryUrl));
106
+ } = await environment.runner.import(entryUrl));
109
107
  app = fastify({
110
108
  logger: {
111
109
  transport: {
package/dist/index.js CHANGED
@@ -239,9 +239,7 @@ export const baseConfig = async ({ ssr, appDir, publicDir, base = '/', command =
239
239
  code = code.replace(/\/\/ @vitrify-pwa-only((.|\n)*)\/\/ @vitrify-pwa-only-end/, '');
240
240
  }
241
241
  if (['RootComponent.vue', 'vitrify'].every((val) => id.includes(val))) {
242
- const css = `${globalCss
243
- .map((css) => `@import '${css}';`)
244
- .join('\n')}\n`;
242
+ const css = `${globalCss.map((css) => `@import '${css}';`).join('\n')}\n`;
245
243
  const sass = [
246
244
  ...Object.entries(sassVariables)
247
245
  .filter(([key, value]) => value)
@@ -317,9 +315,7 @@ export const baseConfig = async ({ ssr, appDir, publicDir, base = '/', command =
317
315
  return `import ${varName} from '${new URL(url, appDir).href}'; onAppMounted.push(${varName});`;
318
316
  })
319
317
  .join('\n')}
320
- const onAppRendered = [${onAppRenderedHooks
321
- .map((fn) => `${String(fn)}`)
322
- .join(', ')}]
318
+ const onAppRendered = [${onAppRenderedHooks.map((fn) => `${String(fn)}`).join(', ')}]
323
319
  ${onAppRenderedFiles
324
320
  .map((url, index) => {
325
321
  const varName = fileURLToPath(url)
@@ -639,7 +635,8 @@ export const baseConfig = async ({ ssr, appDir, publicDir, base = '/', command =
639
635
  define: {
640
636
  __HOST__: `'localhost'`,
641
637
  __BASE_URL__: `'${base}'`,
642
- __IS_PWA__: `${isPwa}`
638
+ __IS_PWA__: `${isPwa}`,
639
+ __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: `'${debug ? true : false}'`
643
640
  },
644
641
  // environments: {
645
642
  // },
package/package.json CHANGED
@@ -1,14 +1,33 @@
1
1
  {
2
2
  "name": "vitrify",
3
- "version": "0.26.7",
3
+ "version": "0.26.8",
4
+ "description": "Vite as your Full Stack development tool",
5
+ "keywords": [
6
+ "fastify",
7
+ "full stack",
8
+ "vite"
9
+ ],
10
+ "homepage": "https://github.com/simsustech/vitrify/tree/main/#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/simsustech/vitrify/issues"
13
+ },
4
14
  "license": "MIT",
5
15
  "author": "Stefan van Herwijnen",
6
- "description": "Vite as your Full Stack development tool",
7
- "type": "module",
8
- "types": "./dist/types/index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/simsustech/vitrify.git",
19
+ "directory": "packages/vitrify"
20
+ },
9
21
  "bin": {
10
22
  "vitrify": "./dist/bin/cli.js"
11
23
  },
24
+ "files": [
25
+ "dist",
26
+ "src",
27
+ "!dist/**/*.test.js"
28
+ ],
29
+ "type": "module",
30
+ "types": "./dist/types/index.d.ts",
12
31
  "exports": {
13
32
  ".": {
14
33
  "types": "./dist/types/index.d.ts",
@@ -39,26 +58,18 @@
39
58
  "import": "./dist/hooks/index.d.ts"
40
59
  }
41
60
  },
42
- "engines": {
43
- "node": ">=24.0.0"
44
- },
45
- "repository": {
46
- "type": "git",
47
- "url": "git+https://github.com/simsustech/vitrify.git",
48
- "directory": "packages/vitrify"
49
- },
50
- "bugs": {
51
- "url": "https://github.com/simsustech/vitrify/issues"
61
+ "publishConfig": {
62
+ "access": "public",
63
+ "registry": "https://registry.npmjs.org/"
52
64
  },
53
- "homepage": "https://github.com/simsustech/vitrify/tree/main/#readme",
54
65
  "dependencies": {
55
66
  "@fastify/middie": "^9.3.2",
56
67
  "@fastify/one-line-logger": "^2.1.0",
57
68
  "@fastify/static": "^9.1.3",
58
- "@unocss/core": "^66.7.0",
59
- "@unocss/preset-uno": "^66.7.0",
60
- "@unocss/preset-web-fonts": "66.7.0",
61
- "@unocss/preset-wind": "^66.7.0",
69
+ "@unocss/core": "^66.7.2",
70
+ "@unocss/preset-uno": "^66.7.2",
71
+ "@unocss/preset-web-fonts": "66.7.2",
72
+ "@unocss/preset-wind": "^66.7.2",
62
73
  "@vitejs/plugin-vue": "^6.0.7",
63
74
  "ajv": "^8.20.0",
64
75
  "animated-unocss": "^0.0.6",
@@ -68,46 +79,46 @@
68
79
  "devalue": "^5.8.1",
69
80
  "fastify": "^5.8.5",
70
81
  "glob": "^13.0.6",
71
- "happy-dom": "^20.9.0",
82
+ "happy-dom": "^20.10.2",
72
83
  "is-port-reachable": "^4.0.0",
73
84
  "magic-string": "^0.30.21",
74
85
  "merge-deep": "^3.0.3",
75
86
  "readline": "^1.3.0",
76
- "rolldown": "1.0.3",
87
+ "rolldown": "1.1.1",
77
88
  "rollup-plugin-visualizer": "^7.0.1",
78
- "sass": "1.100.0",
89
+ "sass": "1.101.0",
79
90
  "stringify-object": "^6.0.0",
80
91
  "ts-node": "^10.9.2",
81
- "unocss": "^66.7.0",
92
+ "unocss": "^66.7.2",
82
93
  "unplugin-vue-components": "^32.1.0",
83
- "vite": "^8.0.14",
94
+ "vite": "^8.0.16",
84
95
  "vite-plugin-pwa": "^1.3.0",
85
96
  "vitefu": "^1.1.3",
86
- "vitest": "^4.1.7",
97
+ "vitest": "^4.1.8",
87
98
  "workbox-window": "^7.4.1"
88
99
  },
89
100
  "devDependencies": {
90
101
  "@iconify-json/mdi": "^1.2.3",
91
102
  "@pinia/colada": "^1.3.1",
92
- "@quasar/extras": "^2.0.0",
103
+ "@quasar/extras": "^2.0.1",
93
104
  "@quasar/quasar-ui-qmarkdown": "^2.0.5",
94
- "@quasar/quasar-ui-qmediaplayer": "^2.0.0-beta.0",
105
+ "@quasar/quasar-ui-qmediaplayer": "^3.0.0-rc.0",
95
106
  "@types/connect": "^3.4.38",
96
107
  "@types/glob": "^9.0.0",
97
108
  "@types/merge-deep": "^3.0.3",
98
- "@types/node": "^25.9.1",
109
+ "@types/node": "^25.9.3",
99
110
  "@types/stringify-object": "^4.0.5",
100
111
  "@types/ws": "^8.18.1",
101
- "@unocss/preset-icons": "^66.7.0",
102
- "@vue/runtime-core": "^3.5.35",
112
+ "@unocss/preset-icons": "^66.7.2",
113
+ "@vue/runtime-core": "^3.5.38",
103
114
  "beasties": "^0.4.2",
104
115
  "css": "^3.0.0",
105
116
  "css-to-tailwind-translator": "^1.2.8",
106
117
  "pinia": "^3.0.4",
107
- "quasar": "^2.19.3",
108
- "rollup": "^4.60.4",
118
+ "quasar": "^2.20.0",
119
+ "rollup": "^4.61.1",
109
120
  "typescript": "^6.0.3",
110
- "vue": "^3.5.35",
121
+ "vue": "^3.5.38",
111
122
  "vue-router": "^5.1.0"
112
123
  },
113
124
  "peerDependencies": {
@@ -115,24 +126,13 @@
115
126
  "@pinia/colada": "^1.3.1",
116
127
  "fastify": "^5.8.5",
117
128
  "pinia": "^3.0.4",
118
- "quasar": "^2.19.3",
119
- "vue": "^3.5.35",
129
+ "quasar": "^2.20.0",
130
+ "vue": "^3.5.38",
120
131
  "vue-router": "^5.1.0"
121
132
  },
122
- "publishConfig": {
123
- "access": "public",
124
- "registry": "https://registry.npmjs.org/"
133
+ "engines": {
134
+ "node": ">=24.0.0"
125
135
  },
126
- "files": [
127
- "dist",
128
- "src",
129
- "!dist/**/*.test.js"
130
- ],
131
- "keywords": [
132
- "vite",
133
- "full stack",
134
- "fastify"
135
- ],
136
136
  "scripts": {
137
137
  "build": "tsc",
138
138
  "test": "vitest test/"
@@ -3,7 +3,8 @@ import {
3
3
  type InlineConfig,
4
4
  type ViteDevServer,
5
5
  resolveConfig,
6
- ResolvedConfig
6
+ ResolvedConfig,
7
+ RunnableDevEnvironment
7
8
  } from 'vite'
8
9
  import { baseConfig } from '../index.js'
9
10
  import type { Server } from 'net'
@@ -54,9 +55,8 @@ export async function createVitrifyDevServer({
54
55
  publicDir?: URL
55
56
  base?: string
56
57
  }) {
57
- const { getAppDir, getCliDir, getCliViteDir, getCwd } = await import(
58
- '../app-urls.js'
59
- )
58
+ const { getAppDir, getCliDir, getCliViteDir, getCwd } =
59
+ await import('../app-urls.js')
60
60
 
61
61
  if (!appDir) appDir = getAppDir()
62
62
  let config: InlineConfig | ResolvedConfig = {}
@@ -144,9 +144,8 @@ export async function createServer({
144
144
  publicDir?: URL
145
145
  vite?: ViteDevServer
146
146
  }) {
147
- const { getAppDir, getCliDir, getCliViteDir, getCwd } = await import(
148
- '../app-urls.js'
149
- )
147
+ const { getAppDir, getCliDir, getCliViteDir, getCwd } =
148
+ await import('../app-urls.js')
150
149
 
151
150
  appDir = appDir || getAppDir()
152
151
  const cliDir = getCliDir()
@@ -177,14 +176,12 @@ export async function createServer({
177
176
  ? fileURLToPath(new URL('src/vite/fastify/entry.ts', cliDir))
178
177
  : fileURLToPath(new URL(`src/vite/${framework}/ssr/app.ts`, cliDir))
179
178
 
180
- const environment = vite.environments.ssr
179
+ const environment = vite.environments.ssr as RunnableDevEnvironment
181
180
  ;({
182
181
  setup,
183
182
  hooks: { onTemplateRendered, onAppRendered },
184
183
  vitrifyConfig
185
- } =
186
- // @ts-expect-error missing types
187
- await environment.runner.import(entryUrl))
184
+ } = await environment.runner.import(entryUrl))
188
185
 
189
186
  app = fastify({
190
187
  logger: {
package/src/node/index.ts CHANGED
@@ -314,9 +314,7 @@ export const baseConfig = async ({
314
314
  )
315
315
  }
316
316
  if (['RootComponent.vue', 'vitrify'].every((val) => id.includes(val))) {
317
- const css = `${globalCss
318
- .map((css) => `@import '${css}';`)
319
- .join('\n')}\n`
317
+ const css = `${globalCss.map((css) => `@import '${css}';`).join('\n')}\n`
320
318
 
321
319
  const sass = [
322
320
  ...Object.entries(sassVariables)
@@ -398,9 +396,7 @@ export const baseConfig = async ({
398
396
  }'; onAppMounted.push(${varName});`
399
397
  })
400
398
  .join('\n')}
401
- const onAppRendered = [${onAppRenderedHooks
402
- .map((fn) => `${String(fn)}`)
403
- .join(', ')}]
399
+ const onAppRendered = [${onAppRenderedHooks.map((fn) => `${String(fn)}`).join(', ')}]
404
400
  ${onAppRenderedFiles
405
401
  .map((url, index) => {
406
402
  const varName = fileURLToPath(url)
@@ -436,9 +432,7 @@ export const baseConfig = async ({
436
432
  }'; onTemplateRendered.push(${varName});`
437
433
  })
438
434
  .join('\n')}
439
- const onAppCreated = [${OnAppCreatedHooks.map(
440
- (fn) => `${String(fn)}`
441
- ).join(', ')}]
435
+ const onAppCreated = [${OnAppCreatedHooks.map((fn) => `${String(fn)}`).join(', ')}]
442
436
  ${onAppCreatedFiles
443
437
  .map((url, index) => {
444
438
  const varName = fileURLToPath(url)
@@ -760,7 +754,8 @@ export const baseConfig = async ({
760
754
  define: {
761
755
  __HOST__: `'localhost'`,
762
756
  __BASE_URL__: `'${base}'`,
763
- __IS_PWA__: `${isPwa}`
757
+ __IS_PWA__: `${isPwa}`,
758
+ __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: `'${debug ? true : false}'`
764
759
  },
765
760
  // environments: {
766
761
  // },
@@ -42,9 +42,8 @@ const piniaColadaonAppCreated: OnAppCreatedHook = async ({
42
42
  initialState
43
43
  }) => {
44
44
  if (ctx.pinia) {
45
- const { PiniaColada, hydrateQueryCache, useQueryCache } = await import(
46
- '@pinia/colada'
47
- )
45
+ const { PiniaColada, hydrateQueryCache, useQueryCache } =
46
+ await import('@pinia/colada')
48
47
  app.use(PiniaColada)
49
48
 
50
49
  if (initialState?.piniaColada) {