@serwist/nuxt 9.0.6 → 9.0.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/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": "^3.8.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "9.0.6",
8
+ "version": "9.0.7",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "0.8.3",
11
11
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -3,10 +3,9 @@ import { defineNuxtModule, createResolver, addPlugin, extendWebpackConfig } from
3
3
  import { resolveEntry, createContext, createApi, main, dev } from '@serwist/vite';
4
4
  import { createHash } from 'node:crypto';
5
5
  import { createReadStream } from 'node:fs';
6
- import fs from 'node:fs/promises';
7
- import pathe from 'pathe';
6
+ import fsp from 'node:fs/promises';
8
7
 
9
- const version = "9.0.6";
8
+ const version = "9.0.7";
10
9
 
11
10
  function configurePwaOptions(options, nuxt, nitroConfig) {
12
11
  let buildAssetsDir = nuxt.options.app.buildAssetsDir ?? "_nuxt/";
@@ -31,12 +30,12 @@ function configurePwaOptions(options, nuxt, nitroConfig) {
31
30
  options.globPatterns.push(`${appManifestFolder}**/*.json`);
32
31
  }
33
32
  const _public = nitroConfig.output?.publicDir ?? nuxt.options.nitro?.output?.publicDir;
34
- const publicDir = _public ? pathe.resolve(_public) : pathe.resolve(nuxt.options.buildDir, "../.output/public");
33
+ const publicDir = _public ? path.resolve(_public) : path.resolve(nuxt.options.buildDir, "../.output/public");
35
34
  if (!nuxt.options.dev && !options.manifestTransforms) {
36
35
  options.manifestTransforms = [createManifestTransform(nuxt.options.app.baseURL ?? "/", publicDir, appManifestFolder)];
37
36
  }
38
37
  }
39
- function createManifestTransform(base, publicFolder, appManifestFolder) {
38
+ function createManifestTransform(base, publicDir, appManifestFolder) {
40
39
  return async (entries) => {
41
40
  entries.filter((e) => e.url.endsWith(".html")).forEach((e) => {
42
41
  const url = e.url.startsWith("/") ? e.url.slice(1) : e.url;
@@ -54,8 +53,8 @@ function createManifestTransform(base, publicFolder, appManifestFolder) {
54
53
  e.revision = null;
55
54
  });
56
55
  const latest = `${appManifestFolder}latest.json`;
57
- const latestJson = pathe.resolve(publicFolder, latest);
58
- const data = await fs.lstat(latestJson).catch(() => void 0);
56
+ const latestJson = path.resolve(publicDir, latest);
57
+ const data = await fsp.lstat(latestJson).catch(() => void 0);
59
58
  if (data?.isFile()) {
60
59
  const revision = await new Promise((resolve, reject) => {
61
60
  const cHash = createHash("MD5");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/nuxt",
3
- "version": "9.0.6",
3
+ "version": "9.0.7",
4
4
  "type": "module",
5
5
  "description": "A Nuxt module that integrates Serwist into your application.",
6
6
  "files": [
@@ -46,20 +46,15 @@
46
46
  "@nuxt/kit",
47
47
  "@serwist/build",
48
48
  "@serwist/vite",
49
- "pathe",
50
- "ufo",
51
49
  "virtual:serwist-nuxt-configuration",
52
50
  "virtual:serwist"
53
51
  ]
54
52
  },
55
53
  "dependencies": {
56
54
  "@nuxt/kit": "3.12.4",
57
- "fast-json-stable-stringify": "2.1.0",
58
- "pathe": "1.1.2",
59
- "ufo": "1.5.4",
60
- "@serwist/build": "9.0.6",
61
- "@serwist/vite": "9.0.6",
62
- "@serwist/window": "9.0.6"
55
+ "@serwist/build": "9.0.7",
56
+ "@serwist/vite": "9.0.7",
57
+ "@serwist/window": "9.0.7"
63
58
  },
64
59
  "devDependencies": {
65
60
  "@nuxt/module-builder": "0.8.3",
@@ -72,7 +67,7 @@
72
67
  "typescript": "5.5.4",
73
68
  "vite": "5.4.2",
74
69
  "vue-tsc": "2.0.29",
75
- "@serwist/configs": "9.0.6"
70
+ "@serwist/configs": "9.0.7"
76
71
  },
77
72
  "peerDependencies": {
78
73
  "typescript": ">=5.0.0",